Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
- Copyright (C) 1997 - 2000 Pekka Riikonen
+ Copyright (C) 1997 - 2001 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
GNU General Public License for more details.
*/
-/*
- * $Id$
- * $Log$
- * Revision 1.1 2000/06/27 11:36:54 priikone
- * Initial revision
- *
- *
- */
+/* $Id$ */
#include "silcincludes.h"
support SIM's. */
SilcCipherObject silc_cipher_builtin_list[] =
{
- { "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 },
{ "twofish", 16, 16, silc_twofish_set_key, silc_twofish_set_key_with_string,
silc_twofish_encrypt_cbc, silc_twofish_decrypt_cbc,
silc_twofish_context_len },
+ { "aes", 16, 16, silc_rijndael_set_key,
+ silc_rijndael_set_key_with_string, silc_rijndael_encrypt_cbc,
+ silc_rijndael_decrypt_cbc, silc_rijndael_context_len },
{ "rc6", 16, 16, silc_rc6_set_key, silc_rc6_set_key_with_string,
silc_rc6_encrypt_cbc, silc_rc6_decrypt_cbc,
silc_rc6_context_len },
{ "mars", 16, 16, silc_mars_set_key, silc_mars_set_key_with_string,
silc_mars_encrypt_cbc, silc_mars_decrypt_cbc,
silc_mars_context_len },
+ { "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 },
{ NULL, 0, 0, NULL, NULL, NULL, NULL, NULL }
};
SILC_LOG_DEBUG(("Registering new cipher"));
new = silc_calloc(1, sizeof(*new));
- if (!new) {
- SILC_LOG_ERROR(("Could not allocate new cipher list object: %s",
- strerror(errno)));
- return FALSE;
- }
-
new->cipher = silc_calloc(1, sizeof(*new->cipher));
- if (!new->cipher) {
- SILC_LOG_ERROR(("Could not allocate new cipher object: %s",
- strerror(errno)));
- return FALSE;
- }
/* Set the pointers */
new->cipher->name = strdup(cipher->name);
/* Allocate the new object */
*new_cipher = silc_calloc(1, sizeof(**new_cipher));
- if (*new_cipher == NULL) {
- SILC_LOG_ERROR(("Could not allocate new cipher object"));
- return FALSE;
- }
if (silc_cipher_list) {