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
/* Prototypes */
-/****f* silccrypt/SilcCipherAPI/
+/****f* silccrypt/SilcCipherAPI/silc_cipher_register
*
* SYNOPSIS
*
***/
bool silc_cipher_unregister(SilcCipherObject *cipher);
-/****f* silccrypt/SilcCipherAPI/
+/****f* silccrypt/SilcCipherAPI/silc_cipher_register_default
*
* SYNOPSIS
*
*
* SYNOPSIS
*
- * bool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher);
+ * bool silc_cipher_alloc(const unsigned char *name,
+ * SilcCipher *new_cipher);
*
* DESCRIPTION
*
***/
void silc_cipher_free(SilcCipher cipher);
-/****f* silccrypt/SilcCipherAPI/silc_cipher_is_supported(
+/****f* silccrypt/SilcCipherAPI/silc_cipher_is_supported
*
* SYNOPSIS
*
* 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,
* 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
*
***/
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
*