My Project
Functions
des3.h File Reference

Go to the source code of this file.

Functions

int wc_Des_SetKey (Des *des, const byte *key, const byte *iv, int dir)
 This function sets the key and initialization vector (iv) for the Des structure given as argument. It also initializes and allocates space for the buffers needed for encryption and decryption, if these have not yet been initialized. Note: If no iv is provided (i.e. iv == NULL) the initialization vector defaults to an iv of 0. More...
 
void wc_Des_SetIV (Des *des, const byte *iv)
 This function sets the initialization vector (iv) for the Des structure given as argument. When passed a NULL iv, it sets the initialization vector to 0. More...
 
int wc_Des_CbcEncrypt (Des *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses DES encryption with cipher block chaining (CBC) mode. More...
 
int wc_Des_CbcDecrypt (Des *des, byte *out, const byte *in, word32 sz)
 This function decrypts the input ciphertext, in, and stores the resulting plaintext in the output buffer, out. It uses DES encryption with cipher block chaining (CBC) mode. More...
 
int wc_Des_EcbEncrypt (Des *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses Des encryption with Electronic Codebook (ECB) mode. More...
 
int wc_Des3_EcbEncrypt (Des3 *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses Des3 encryption with Electronic Codebook (ECB) mode. Warning: In nearly all use cases ECB mode is considered to be less secure. Please avoid using ECB API’s directly whenever possible. More...
 
int wc_Des3_SetKey (Des3 *des, const byte *key, const byte *iv, int dir)
 This function sets the key and initialization vector (iv) for the Des3 structure given as argument. It also initializes and allocates space for the buffers needed for encryption and decryption, if these have not yet been initialized. Note: If no iv is provided (i.e. iv == NULL) the initialization vector defaults to an iv of 0. More...
 
int wc_Des3_SetIV (Des3 *des, const byte *iv)
 This function sets the initialization vector (iv) for the Des3 structure given as argument. When passed a NULL iv, it sets the initialization vector to 0. More...
 
int wc_Des3_CbcEncrypt (Des3 *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses Triple Des (3DES) encryption with cipher block chaining (CBC) mode. More...
 
int wc_Des3_CbcDecrypt (Des3 *des, byte *out, const byte *in, word32 sz)
 This function decrypts the input ciphertext, in, and stores the resulting plaintext in the output buffer, out. It uses Triple Des (3DES) encryption with cipher block chaining (CBC) mode. More...