projects
/
crypto.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major restructuring of the internals of SILC Cipher API
[crypto.git]
/
lib
/
silccrypt
/
rc5.c
diff --git
a/lib/silccrypt/rc5.c
b/lib/silccrypt/rc5.c
index b84289b2f99658c8d4af26814510d980af87371e..3e93da32c49c1b95aa5f5d27372043853f377d82 100644
(file)
--- a/
lib/silccrypt/rc5.c
+++ b/
lib/silccrypt/rc5.c
@@
-65,11
+65,20
@@
SILC_CIPHER_API_SET_IV(rc5_cbc)
}
}
-/*
Returns the size of the cipher context.
*/
+/*
Initialize
*/
-SILC_CIPHER_API_
CONTEXT_LEN
(rc5_cbc)
+SILC_CIPHER_API_
INIT
(rc5_cbc)
{
{
- return sizeof(RC5Context);
+ return silc_calloc(1, sizeof(RC5Context));
+}
+
+/* Initialize */
+
+SILC_CIPHER_API_UNINIT(rc5_cbc)
+{
+ RC5Context *rc5 = context;
+ memset(rc5, 0, sizeof(*rc5));
+ silc_free(rc5);
}
/* Encrypts with the cipher in CBC mode. Source and destination buffers
}
/* Encrypts with the cipher in CBC mode. Source and destination buffers