*/
-/****h* silccrypt/SILC Cipher Interface
+/****h* silccrypt/Cipher Interface
*
* DESCRIPTION
*
* 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);
+ *
***/
#ifndef SILCCIPHER_H
#define SILC_CIPHER_NONE "none"
/***/
-/****d* silccrypt/Cipher Algorithms
+/****d* silccrypt/Cipher-Algorithms
*
* NAME
*
* argument. The caller must set the key to the cipher after this
* function has returned by calling the silc_cipher_set_key.
*
+ * See Ciphers for supported ciphers.
+ *
***/
SilcBool silc_cipher_alloc(const char *name, SilcCipher *new_cipher);
-/****f* silccrypt/silc_cipher_alloc
+/****f* silccrypt/silc_cipher_alloc_full
*
* SYNOPSIS
*
* Same as silc_cipher_alloc but takes the cipher algorithm name,
* key length and mode as separate arguments.
*
+ * See Cipher-Algorithms for supported algorithms.
+ *
***/
SilcBool silc_cipher_alloc_full(const char *alg_name, SilcUInt32 key_len,
SilcCipherMode mode, SilcCipher *new_cipher);