Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ISymmetricCrypto::decrypt ( P6CRYPTODATASOURCE pInData,
P6CRYPTODATASINK pOutData,
const P6UCHAR pIV,
P6INT32  cIV 
)
pure virtual

This method is used to decrypt data using the cipher the component was initialized with.

The method setKey() must have been called prior to calling this method.

Note, that the value passed in pIV and cIV is ignored when a P6CRYPTOCIPHER::CIPHER_AES_CTR is in use. When a P6CRYPTOCIPHER::CIPHER_AES_CTR is in use, at least one call to setAESCounter() must be called before this method is called.

Parameters
pInData[ in ] Specifies the data to be decrypted.
pOutData[ in ] Specifies where to place the decrypted data.
pIV[ in ] This a pointer to the initialization vector to be used for encrypting the data.
cIV[ in ] This is number of bytes in pIV and must be at least P6CRYPTOIVLEN bytes long.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eFormatErrorloadSymetricKey has not been successfully invoked.
P6R::eInvalidArgOne of the parameters is NULL.
P6R::eNotFoundFile data source does not exist.
P6R::eInvalidDescriptorThe requested cipher and key size is not supported.
P6R::eIoErrorWrite to file data sink failed.
P6R::eTooSmallThe buffer data sink is too small to contain the generated value.
P6R::eNoMemory/td>Insufficent memory for buffering.
P6R::eFailAndExceptionThe decryption calculation failed. Exception record provides detailed error info.