Decrypts a ciphertext buffer using the given DES parameters and key.
#include "hudes.h"
int hu_DESDecryptMsg(sb_Params desParams, sb_Key desKey, size_t ivLen, const unsigned char *iv, size_t length, const unsigned char *ciphertext, unsigned char *plaintext, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
A DES parameters object.
A DES key object.
The length (in bytes) of initial vector. The only acceptable value is SB_DES_IV_SIZE.
The initial vector.
The length (in bytes) of ciphertext. The acceptable values are multiples of SB_DES_BLOCK_SIZE.
The ciphertext buffer.
The plaintext buffer.
A global context.
For the SB_DES_CBC, SB_DES_CFB64 and SB_DES_OFB64 modes of operation, an initial vector is required. iv is ignored for SB_DES_ECB, as an initial vector is not required for that mode. The plaintext and ciphertext buffers must be the same length, and may overlap in memory subject to the constraints described in the API Reference section on overlapping buffers.
Note: This function should only be called for blocks of plaintext and ciphertext that can be stored entirely in memory.
The deskParams object is NULL.
The tag for the params object is not of the expected type.
The desKey object is NULL.
The desKey object is invalid.
The initial vector, iv, is NULL.
The length of the initial vector, ivLen, is invalid.
The ciphertext buffer is NULL.
The length of the ciphertext buffer is invalid.
The plaintext buffer is NULL.
Success.