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 TBoolIsAsymmetricWeakEnoughL(TInt)
IMPORT_C TBoolIsSymmetricWeakEnoughL(TInt)
IMPORT_C TCrypto::TStrengthStrength()
Public Member Enumerations
enumTStrength { EWeak, EStrong }

Member Functions Documentation

IsAsymmetricWeakEnoughL(TInt)

IMPORT_C TBoolIsAsymmetricWeakEnoughL(TIntaAsymmetricKeyBits)[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 aAsymmetricKeyBitsThe size (in bits) of the asymmetric key

IsSymmetricWeakEnoughL(TInt)

IMPORT_C TBoolIsSymmetricWeakEnoughL(TIntaSymmetricKeyBits)[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 aSymmetricKeyBitsThe size (in bits) of the symmetric key

Strength()

IMPORT_C TCrypto::TStrengthStrength()[static]

Gets the allowed cipher strength.

Member Enumerations Documentation

Enum TStrength

Defines the strength of the cipher.

Enumerators

EWeak
EStrong