Merged silc_1_0_branch to trunk.
[silc.git] / lib / silccrypt / silccipher.h
index c9d64e42e7bb1677f5ddd5d21973fa39243dcbcd..5947533430aba237c4dca56405e11f41584c040d 100644 (file)
@@ -2,14 +2,13 @@
 
   silccipher.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
   Copyright (C) 1997 - 2002 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
+  the Free Software Foundation; version 2 of the License.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -117,7 +116,7 @@ SilcUInt32 silc_##cipher##_context_len()
 
 /* Prototypes */
 
-/****f* silccrypt/SilcCipherAPI/
+/****f* silccrypt/SilcCipherAPI/silc_cipher_register
  *
  * SYNOPSIS
  *
@@ -146,7 +145,7 @@ bool silc_cipher_register(const SilcCipherObject *cipher);
  ***/
 bool silc_cipher_unregister(SilcCipherObject *cipher);
 
-/****f* silccrypt/SilcCipherAPI/
+/****f* silccrypt/SilcCipherAPI/silc_cipher_register_default
  *
  * SYNOPSIS
  *
@@ -178,7 +177,8 @@ bool silc_cipher_unregister_all(void);
  *
  * SYNOPSIS
  *
- *    bool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher);
+ *    bool silc_cipher_alloc(const unsigned char *name,
+ *                           SilcCipher *new_cipher);
  *
  * DESCRIPTION
  *
@@ -203,7 +203,7 @@ bool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher);
  ***/
 void silc_cipher_free(SilcCipher cipher);
 
-/****f* silccrypt/SilcCipherAPI/silc_cipher_is_supported(
+/****f* silccrypt/SilcCipherAPI/silc_cipher_is_supported
  *
  * SYNOPSIS
  *
@@ -240,7 +240,8 @@ char *silc_cipher_get_supported(void);
  * DESCRIPTION
  *
  *    Encrypts data from `src' into `dst' with the specified cipher and
- *    Initial Vector (IV).  The `src' and `dst' maybe same buffer.
+ *    Initial Vector (IV).  If the `iv' is NULL then the cipher's internal
+ *    IV is used.  The `src' and `dst' maybe same buffer.
  * 
  ***/
 bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
@@ -258,14 +259,15 @@ bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
  * DESCRIPTION
  *
  *    Decrypts data from `src' into `dst' with the specified cipher and
- *    Initial Vector (IV).  The `src' and `dst' maybe same buffer.
+ *    Initial Vector (IV).  If the `iv' is NULL then the cipher's internal
+ *    IV is used.  The `src' and `dst' maybe same buffer.
  *
  ***/
 bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
                         unsigned char *dst, SilcUInt32 len, 
                         unsigned char *iv);
 
-/****f* silccrypt/SilcCipherAPI/
+/****f* silccrypt/SilcCipherAPI/silc_cipher_set_key
  *
  * SYNOPSIS
  *
@@ -309,7 +311,7 @@ void silc_cipher_set_iv(SilcCipher cipher, const unsigned char *iv);
  ***/
 unsigned char *silc_cipher_get_iv(SilcCipher cipher);
 
-/****f* silccrypt/SilcCipherAPI/SilcUInt32 silc_cipher_get_key_len
+/****f* silccrypt/SilcCipherAPI/silc_cipher_get_key_len
  *
  * SYNOPSIS
  *