-bool silc_cipher_is_supported(const unsigned char *name);
-char *silc_cipher_get_supported(void);
-bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
- unsigned char *dst, uint32 len,
- unsigned char *iv);
-bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
- unsigned char *dst, uint32 len,
- unsigned char *iv);
-bool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
- uint32 keylen);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_is_supported
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_cipher_is_supported(const char *name);
+ *
+ * DESCRIPTION
+ *
+ * Returns TRUE if cipher `name' is supported.
+ *
+ ***/
+SilcBool silc_cipher_is_supported(const char *name);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_get_supported
+ *
+ * SYNOPSIS
+ *
+ * char *silc_cipher_get_supported(SilcBool only_registered);
+ *
+ * DESCRIPTION
+ *
+ * Returns comma separated list of supported ciphers. If `only_registered'
+ * is TRUE only ciphers explicitly registered with silc_cipher_register
+ * are returned. If FALSE, then all registered and default builtin
+ * ciphers are returned. However, if there are no registered ciphers
+ * and `only_registered' is TRUE, the builtin ciphers are returned.
+ *
+ ***/
+char *silc_cipher_get_supported(SilcBool only_registered);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_encrypt
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_cipher_encrypt(SilcCipher cipher,
+ * const unsigned char *src,
+ * unsigned char *dst, SilcUInt32 len,
+ * unsigned char *iv);
+ *
+ * DESCRIPTION
+ *
+ * Encrypts data from `src' into `dst' with the specified cipher and
+ * Initial Vector (IV). If the `iv' is NULL then the cipher's internal
+ * IV is used. The `src' and `dst' maybe same buffer.
+ *
+ ***/
+SilcBool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
+ unsigned char *dst, SilcUInt32 len,
+ unsigned char *iv);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_decrypt
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_cipher_decrypt(SilcCipher cipher,
+ * const unsigned char *src,
+ * unsigned char *dst, SilcUInt32 len,
+ * unsigned char *iv);
+ *
+ * DESCRIPTION
+ *
+ * Decrypts data from `src' into `dst' with the specified cipher and
+ * Initial Vector (IV). If the `iv' is NULL then the cipher's internal
+ * IV is used. The `src' and `dst' maybe same buffer.
+ *
+ ***/
+SilcBool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
+ unsigned char *dst, SilcUInt32 len,
+ unsigned char *iv);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_set_key
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
+ * SilcUInt32 keylen, SilcBool encryption);
+ *
+ * DESCRIPTION
+ *
+ * Sets the key for the cipher. The `keylen' is the key length in
+ * bits. If the `encryption' is TRUE the key is for encryption, if FALSE
+ * the key is for decryption.
+ *
+ ***/
+SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
+ SilcUInt32 keylen, SilcBool encryption);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_set_iv
+ *
+ * SYNOPSIS
+ *
+ * void silc_cipher_set_iv(SilcCipher cipher, const unsigned char *iv);
+ *
+ * DESCRIPTION
+ *
+ * Sets the IV (initialization vector) for the cipher. The `iv' must be
+ * the size of the block size of the cipher. If `iv' is NULL this
+ * does not do anything.
+ *
+ * If the encryption mode is CTR (Counter mode) this also resets the
+ * the counter for a new block. This is done also if `iv' is NULL.
+ *
+ * If the encryption mode is CFB (cipher feedback) this also resets the
+ * the feedback stream for a new block. This is done also if `iv' is NULL.
+ *
+ ***/