TCrypto Class Reference

class TCrypto

Some builds of the crypto library have restrictions that only allow weak ciphers to be used. This class provides static helper functions for determining these restrictions.

Public Member Functions
IMPORT_C TBool IsAsymmetricWeakEnoughL ( TInt )
IMPORT_C TBool IsSymmetricWeakEnoughL ( TInt )
IMPORT_C TCrypto::TStrength Strength ()
Public Member Enumerations
enum TStrength { EWeak , EStrong }

Member Functions Documentation

IsAsymmetricWeakEnoughL(TInt)

IMPORT_C TBool IsAsymmetricWeakEnoughL ( TInt aAsymmetricKeyBits ) [static]

Indicates whether an asymmetric key is small enough to be allowed. Note that this function leaves if the key is too large - in other words it can never return EFalse.

leave
KErrKeyNotWeakEnough If the key size is larger than that allowed by the cipher strength restrictions of the crypto library.

Parameters

TInt aAsymmetricKeyBits The size (in bits) of the asymmetric key

IsSymmetricWeakEnoughL(TInt)

IMPORT_C TBool IsSymmetricWeakEnoughL ( TInt aSymmetricKeyBits ) [static]

Indicates whether a symmetric key is small enough to be allowed. Note that this function leaves if the key is too large - in other words it can never return EFalse.

leave
KErrKeyNotWeakEnough If the key size is larger than that allowed by the cipher strength restrictions of the crypto library.

Parameters

TInt aSymmetricKeyBits The size (in bits) of the symmetric key

Strength()

IMPORT_C TCrypto::TStrength Strength ( ) [static]

Gets the allowed cipher strength.

Member Enumerations Documentation

Enum TStrength

Defines the strength of the cipher.

Enumerators

EWeak
EStrong