*/
/* $Id$ */
-#include "silcincludes.h"
+#include "silc.h"
#include "ciphers.h" /* Includes cipher definitions */
/* The SilcCipher context */
{ "cast-128-cbc", 16, 128, silc_cast_set_key, silc_cast_set_key_with_string,
silc_cast_encrypt_cbc, silc_cast_decrypt_cbc,
silc_cast_context_len },
+#ifdef SILC_DEBUG
{ "none", 0, 0, silc_none_set_key, silc_none_set_key_with_string,
silc_none_encrypt_cbc, silc_none_decrypt_cbc,
silc_none_context_len },
+#endif /* SILC_DEBUG */
{ NULL, 0, 0, NULL, NULL, NULL, NULL, NULL }
};
registered. Therefore, if memory has been allocated for the object sent
as argument it has to be free'd after this function returns succesfully. */
-bool silc_cipher_register(const SilcCipherObject *cipher)
+SilcBool silc_cipher_register(const SilcCipherObject *cipher)
{
#ifndef SILC_EPOC
SilcCipherObject *new;
/* Unregister a cipher from the SILC. */
-bool silc_cipher_unregister(SilcCipherObject *cipher)
+SilcBool silc_cipher_unregister(SilcCipherObject *cipher)
{
#ifndef SILC_EPOC
SilcCipherObject *entry;
The application may use this to register the default ciphers if specific
ciphers in any specific order is not wanted. */
-bool silc_cipher_register_default(void)
+SilcBool silc_cipher_register_default(void)
{
#ifndef SILC_EPOC
int i;
return TRUE;
}
-bool silc_cipher_unregister_all(void)
+SilcBool silc_cipher_unregister_all(void)
{
#ifndef SILC_EPOC
SilcCipherObject *entry;
caller must set the key to the cipher after this function has returned
by calling the ciphers set_key function. */
-bool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher)
+SilcBool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher)
{
SilcCipherObject *entry = NULL;
/* Returns TRUE if cipher `name' is supported. */
-bool silc_cipher_is_supported(const unsigned char *name)
+SilcBool silc_cipher_is_supported(const unsigned char *name)
{
#ifndef SILC_EPOC
SilcCipherObject *entry;
/* Encrypts */
-bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
+SilcBool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
unsigned char *dst, SilcUInt32 len,
unsigned char *iv)
{
/* Decrypts */
-bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
+SilcBool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
unsigned char *dst, SilcUInt32 len,
unsigned char *iv)
{
/* Sets the key for the cipher */
-bool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
+SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
SilcUInt32 keylen)
{
return cipher->cipher->set_key(cipher->context, key, keylen);