CPKCS7EncryptedDataObject Class Reference

class CPKCS7EncryptedDataObject : public CBase

A representation of a PKCS7 (Encrypted data) entity This class decodes the PKCS7 Encrypted Data content. It provides various exported methods which will return the values present in the EncryptedData ::= SEQUENCE.

Inherits from

Constructor & Destructor Documentation

CPKCS7EncryptedDataObject(void)

CPKCS7EncryptedDataObject ( void ) [private]

Constructor.

Parameters

void

CPKCS7EncryptedDataObject(const CPKCS7EncryptedDataObject &)

CPKCS7EncryptedDataObject ( const CPKCS7EncryptedDataObject & aEncryptedDataObject ) [private]

Copy Constructor.

Parameters

const CPKCS7EncryptedDataObject & aEncryptedDataObject A CPKCS7EncryptedDataObject object.

~CPKCS7EncryptedDataObject()

~CPKCS7EncryptedDataObject ( ) [virtual]

Destructor.

Member Functions Documentation

ConstructL(const CPKCS7ContentInfo &)

void ConstructL ( const CPKCS7ContentInfo & aContentInfo ) [private]

This decrypt the encrypted data. Below is the ASN1 syntax.

EncryptedData ::= SEQUENCE { version Version, encryptedContentInfo EncryptedContentInfo } EncryptedContentInfo ::= SEQUENCE { contentType PKCS7-CONTENT-TYPE.&id({PKCS7ContentTable}), contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier, encryptedContent [0] ENCRYPTED{PKCS7-CONTENT-TYPE.&Type({PKCS7ContentTable}{@.contentType})} OPTIONAL } EncryptedContent ::= OCTET STRING

ContentInfo ::= SEQUENCE { contentType ContentType, content[0] EXPLICIT ANY DEFINED BY contentType OPTIONAL } ContentType ::= OBJECT IDENTIFIER

leave
KErrArgument if the data is not valid PKCS#7 EncryptedData Structure.
CPKCS7ContentInfo

Parameters

const CPKCS7ContentInfo & aContentInfo Contains a reference to CPKCS7ContentInfo

ContentType()

IMPORT_C CPKCS7EncryptedDataObject::TContentType ContentType ( ) const

Provides access to the ContentType present within the EncryptedContentInfo. ContentType indicates the type of content.This is represented using the OID.

DecodeContentEncryptionAlgorithmL(const TDesC8 &)

CPBEncryptParms * DecodeContentEncryptionAlgorithmL ( const TDesC8 & aBinaryData ) const [private]

Provides access to the Encrypt Parameters present within the ContentEncryptionAlgorithm Sequence. Below is the ASN1 Syntax.

ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier AlgorithmIdentifier: A type that identifies an algorithm (by object identifier) and associated parameters AlgorithmIdentifier ::= SEQUENCE { algorithm ALGORITHM.&id({SupportedAlgorithms}), parameters ALGORITHM.&Type({SupportedAlgorithms}{@ algorithm}) OPTIONAL }

leave
KErrArgument if the data is not valid PKCS#7 ContentEncryptionAlgorithm sequence.
CPBEncryptParms , TASN1DecPKCS5 .

Parameters

const TDesC8 & aBinaryData which is the ContentEncryptionAlgorithmIdentifier and is AlgorithIdentifier Type. AlgorithmIdentifier: A type that identifies an algorithm (by object identifier) and associated parameters.

DecryptDataL(const TDesC &)

IMPORT_C HBufC8 * DecryptDataL ( const TDesC & aPassword ) const
This method decrypts the encrypted information. The caller assumes ownership of the returned object.
leave
KErrNotSupported if otherthan pkcs12 pbeIds used.
leave
KErrGeneral if decrypt descriptor length is less than 0.
PKCS12KDF , TPBPassword , CPBEncryptElement , CPBDecryptor .

Parameters

const TDesC & aPassword is the password used for decryption.

EncryptParams()

IMPORT_C const CPBEncryptParms & EncryptParams ( ) const

Provides access to the contentEncryptionAlgorithm within the EncryptedContentInfo SEQUENCE.

EncryptedContentInfoData()

IMPORT_C const TDesC8 & EncryptedContentInfoData ( ) const

Provides access to the encryptedContent within the EncryptedContentInfo SEQUENCE. encryptedContent is OPTIONAL in EncryptedContentInfo SEQUENCE This will return a NULL pointer in case there is no encryptedContent

NewL(const CPKCS7ContentInfo &)

IMPORT_C CPKCS7EncryptedDataObject * NewL ( const CPKCS7ContentInfo & aContentInfo ) [static]

Creates a new PKCS#7 EncryptedData object.

Parameters

const CPKCS7ContentInfo & aContentInfo contains a reference to CPKCS7ContentInfo.

Version()

IMPORT_C TInt Version ( ) const

Provides access to the version number within the EncryptedData SEQUENCE. Version is the syntax version number.It shall be 0 for this version of the standard

operator=(const CPKCS7EncryptedDataObject &)

CPKCS7EncryptedDataObject & operator= ( const CPKCS7EncryptedDataObject & aEncryptedDataObject ) [private]

Assignment operator.

Parameters

const CPKCS7EncryptedDataObject & aEncryptedDataObject A CPKCS7EncryptedDataObject object.

Member Enumerations Documentation

Enum TContentType

Identifies the type of ContentType present in the EncryptedContentInfo ::= SEQUENCE

Enumerators

EPkcs7Data = 1

Member Data Documentation

TContentType iContentType

TContentType iContentType [private]

Indicates the type of content in PKCS7 EncryptedContentInfo Sequence

CPBEncryptParms * iEncryptParams

CPBEncryptParms * iEncryptParams [private]

Identifies the content-encryption algorithm (and any associated parameters) under which the content is encrypted

TPtrC8 iEncryptedContent

TPtrC8 iEncryptedContent [private]

Contains the encrypted content

TInt iVersion

TInt iVersion [private]

version is the syntax version number in PKCS#7 EncryptedData ::= SEQUENCE