C_Decrypt

This function operates as specified in PKCS#11 except for the following:

Symmetric cipher operations are terminated by this function. Although this function terminates the current decryption operation the session’s decryption state is not cleared.

NOTE   If the mechanism in use is a multi-part mechanism and the data supplied exceeds a single block, that portion of the data is processed regardless of the result returned by the call. For example if 12 bytes are passed to a DES ECB operation, 8 bytes are processed even though an error result (due to the padding requirements not being met) is returned.

Cryptoki specifies that a successful return from one of these functions (when not used for length prediction) should result in the cipher state of that session being reset (to the uninitialized state). SafeNet ProtectToolkit-C, however, leaves the state initialized so that another operation (using the same key) may be performed without calling the appropriate C_xxxInit function. 

Synopsis

C_Decrypt(
        CK_SESSION_HANDLE hSession,
        CK_BYTE_PTR pEncryptedData,
        CK_ULONG ulEncryptedDataLen,
        CK_BYTE_PTR pData,
        CK_ULONG_PTR pulDataLen
);