TASN1DecPKCS8 Class Reference

class TASN1DecPKCS8

Provides the means to decode PKCS#8 encoded private keys.

Public Member Functions
IMPORT_C CDecPKCS8Data *DecodeDERL(const TDesC8 &)
IMPORT_C CDecPKCS8Data *DecodeEncryptedDERL(const TDesC8 &, const TDesC8 &)
IMPORT_C TBoolIsEncryptedPKCS8Data(const TDesC8 &)
IMPORT_C TBoolIsPKCS8Data(const TDesC8 &)
Private Member Functions
TBool IsASN1Sequence(const TDesC8 &, TInt &)
TBool IsExpectedData(const TDesC8 &, TInt &, const TDesC8 &)

Member Functions Documentation

DecodeDERL(const TDesC8 &)

IMPORT_C CDecPKCS8Data *DecodeDERL(const TDesC8 &aBinaryData)[static]

Decodes DER encoded ASN1 data representing a PKCS#8 clear text private key. See the PKCS#8 specifications for the ASN1 syntax.

Parameters

const TDesC8 & aBinaryDataA descriptor containing the ASN1 data.

DecodeEncryptedDERL(const TDesC8 &, const TDesC8 &)

IMPORT_C CDecPKCS8Data *DecodeEncryptedDERL(const TDesC8 &aBinaryData,
const TDesC8 &aPassword
)[static]

Decodes DER encoded ASN1 data representing a PKCS#8 encrypted private key. See the PKCS#8 specifications for the ASN1 syntax.

Parameters

const TDesC8 & aBinaryDataA descriptor containing the ASN1 data.
const TDesC8 & aPasswordThe password to decrypt the key.

IsASN1Sequence(const TDesC8 &, TInt &)

TBool IsASN1Sequence(const TDesC8 &aBinaryData,
TInt &aPos
)[private, static]

Determine if the some data represents the start of an ASN1 sequence. The data is specified by a descriptor and an offset. If the data matches, the offset is advanced to point to the contents of the sequence.

Parameters

const TDesC8 & aBinaryData
TInt & aPos

IsEncryptedPKCS8Data(const TDesC8 &)

IMPORT_C TBoolIsEncryptedPKCS8Data(const TDesC8 &aBinaryData)[static]

Determines if some binary data is an encrypted pkcs#8 private key.

Parameters

const TDesC8 & aBinaryDataA descriptor containing the data.

IsExpectedData(const TDesC8 &, TInt &, const TDesC8 &)

TBool IsExpectedData(const TDesC8 &aBinaryData,
TInt &aPos,
const TDesC8 &aExpectedData
)[private, static]

Determine if some data starts with an expected string. The data is specified by a descriptor and an offset. If the data matches, the offset is advanced to point after the match.

Parameters

const TDesC8 & aBinaryData
TInt & aPos
const TDesC8 & aExpectedData

IsPKCS8Data(const TDesC8 &)

IMPORT_C TBoolIsPKCS8Data(const TDesC8 &aBinaryData)[static]

Determines if some binary data is a pkcs#8 clear text private key.

Parameters

const TDesC8 & aBinaryDataA descriptor containing the data. This must be at least KIsPKCS8DataMinLength bytes long.