Update contrib.
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * ** IMPORTANT ** PublishedPartner API's in this file are published to 3rd party developers via the
16 * Symbian website. Changes to these API's should be treated as PublishedAll API changes and the Security TA should be consulted.
27 #ifndef __CRYPTOSTRENGTH_H__
28 #define __CRYPTOSTRENGTH_H__
31 * Some builds of the crypto library have restrictions that only allow weak
32 * ciphers to be used. This class provides static helper functions for
33 * determining these restrictions.
39 * Defines the strength of the cipher.
47 * Gets the allowed cipher strength.
49 * @return The allowed cipher strength.
51 static IMPORT_C TCrypto::TStrength Strength();
54 * Indicates whether a symmetric key is small enough to be allowed. Note
55 * that this function leaves if the key is too large - in other words it can
56 * never return EFalse.
58 * @param aSymmetricKeyBits The size (in bits) of the symmetric key
59 * @return Whether the key is small enough to be allowed
61 * @leave KErrKeyNotWeakEnough If the key size is larger than that allowed by the
62 * cipher strength restrictions of the crypto library.
64 static IMPORT_C TBool IsSymmetricWeakEnoughL(TInt aSymmetricKeyBits);
67 * Indicates whether an asymmetric key is small enough to be allowed. Note
68 * that this function leaves if the key is too large - in other words it can
69 * never return EFalse.
71 * @param aAsymmetricKeyBits The size (in bits) of the asymmetric key
72 * @return Whether the key is small enough to be allowed
74 * @leave KErrKeyNotWeakEnough If the key size is larger than that allowed by the
75 * cipher strength restrictions of the crypto library.
77 static IMPORT_C TBool IsAsymmetricWeakEnoughL(TInt aAsymmetricKeyBits);
80 #endif //__CRYPTOSTRENGTH_H__