Cipher Interface

DESCRIPTION

This is the interface for cipher functions. It provides cipher registering and unregistering routines, encryption and decryption routines.

EXAMPLE

 // Allocate AES-128 cipher in CBC mode
 SilcCipher aes;

 silc_cipher_alloc(SILC_CIPHER_AES_128_CBC, &aes);

 // Set key for encryption, key length must in bits
 silc_cipher_set_key(aes, key, key_len * 8, TRUE);

 // Set IV
 silc_cipher_set_iv(aes, iv);

 // Encrypt data
 silc_cipher_encrypt(aes, src, dst, len, NULL);

TABLE OF CONTENTS