CDES Class Reference

class CDES : public CBlockTransformation

Abstract base class for DES, implementing features common between DES encryption and decryption. From CBlockTransformation

Inherits from

Constructor & Destructor Documentation

CDES()

CDES()[protected]

~CDES()

~CDES()[virtual]

Member Functions Documentation

BlockSize()

TInt BlockSize()const [virtual]

Gets the block size in bytes.

ConstructL(const TDesC8 &, TBool)

voidConstructL(const TDesC8 &aKey,
TBoolaCheckWeakKey
)[protected, virtual]

Parameters

const TDesC8 & aKey
TBool aCheckWeakKey

DoTransform(TUint32 &, TUint32 &, const TUint32 *)

voidDoTransform(TUint32 &l,
TUint32 &r,
const TUint32 *aKey
)[protected]

Parameters

TUint32 & l
TUint32 & r
const TUint32 * aKey

IsWeakKey(const TDesC8 &)

IMPORT_C TBoolIsWeakKey(const TDesC8 &aKey)[static]

Indicates whether a supplied key is weak. If the key is one of the weak keys defined by the crypto library (e.g. {0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}) ETrue is returned.

Parameters

const TDesC8 & aKeyThe Key to be checked. The key length must be KDESKeySize = 8 bytes.

KeySize()

TInt KeySize()const [virtual]

Gets the key size in bits.

Reset()

voidReset()[virtual]

Resets the transformation back to its original state. Clears all its buffers.

SetKey(const TDesC8 &, TUint32 *)

voidSetKey(const TDesC8 &aKey,
TUint32 *aKeyBuffer
)[protected, virtual]

Parameters

const TDesC8 & aKey
TUint32 * aKeyBuffer

Transform(TDes8 &)

voidTransform(TDes8 &aBlock)[virtual]

Transforms the supplied block, returning the new value using the same parameter. aBlock.Size() must be the same length as BlockSize().

Parameters

TDes8 & aBlockOn input, the data to be transformed; on return, the data after transformation.

Member Data Documentation

TUint32 iK1

TUint32 iK1[protected]

Key schedule array

Also used as the first key in triple-DES

HBufC8 * iKey

HBufC8 *iKey[protected]

The initial key.

The key length must be KDESKeySize = 8 bytes.