X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Frc5.c;h=dfbe7e4376e23292c2205c43e6fb90740969fb32;hb=40f8443d8d3a6577336ee66d18e04d9ac4d956bb;hp=880d1f3f2e843aa93596fa71caeb2881482a4a86;hpb=8a740fff96eac343bd8ae703b87984ef39341540;p=silc.git diff --git a/lib/silccrypt/rc5.c b/lib/silccrypt/rc5.c index 880d1f3f..dfbe7e43 100644 --- a/lib/silccrypt/rc5.c +++ b/lib/silccrypt/rc5.c @@ -38,7 +38,8 @@ * */ -#include "silcincludes.h" +#include "silc.h" +#include "rc5_internal.h" #include "rc5.h" /* @@ -49,7 +50,7 @@ SILC_CIPHER_API_SET_KEY(rc5) { - uint32 k[8]; + SilcUInt32 k[8]; SILC_GET_WORD_KEY(key, k, keylen); rc5_set_key((RC5Context *)context, k, keylen); @@ -62,14 +63,6 @@ SILC_CIPHER_API_SET_KEY(rc5) SILC_CIPHER_API_SET_KEY_WITH_STRING(rc5) { - /* unsigned char key[md5_hash_len]; - SilcMarsContext *ctx = (SilcMarsContext *)context; - - make_md5_hash(string, &key); - memcpy(&ctx->key, mars_set_key(&key, keylen), keylen); - memset(&key, 'F', sizeoof(key)); - */ - return 1; } @@ -85,7 +78,7 @@ SILC_CIPHER_API_CONTEXT_LEN(rc5) SILC_CIPHER_API_ENCRYPT_CBC(rc5) { - uint32 tiv[4]; + SilcUInt32 tiv[4]; int i; SILC_CBC_GET_IV(tiv, iv); @@ -110,7 +103,7 @@ SILC_CIPHER_API_ENCRYPT_CBC(rc5) SILC_CIPHER_API_DECRYPT_CBC(rc5) { - uint32 tmp[4], tmp2[4], tiv[4]; + SilcUInt32 tmp[4], tmp2[4], tiv[4]; int i; SILC_CBC_GET_IV(tiv, iv); @@ -146,7 +139,7 @@ SILC_CIPHER_API_DECRYPT_CBC(rc5) /* Sets RC5 key */ -int rc5_set_key(RC5Context *ctx, const uint32 in_key[], int key_len) +int rc5_set_key(RC5Context *ctx, const SilcUInt32 in_key[], int key_len) { u32 i, j, k, A, B, L[c]; u32 *out_key = ctx->out_key;