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
/
blowfish.c
diff --git
a/lib/silccrypt/blowfish.c
b/lib/silccrypt/blowfish.c
index 067a8fb701fa1364a56c4223c19932442aa9210b..862f1c2015f0ac980b90998d542bbaf92a1bdf44 100644
(file)
--- a/
lib/silccrypt/blowfish.c
+++ b/
lib/silccrypt/blowfish.c
@@
-56,11
+56,20
@@
SILC_CIPHER_API_SET_IV(blowfish_cbc)
}
}
-/*
Returns the size of the cipher context.
*/
+/*
Initialize
*/
-SILC_CIPHER_API_
CONTEXT_LEN
(blowfish_cbc)
+SILC_CIPHER_API_
INIT
(blowfish_cbc)
{
{
- return sizeof(BlowfishContext);
+ return silc_calloc(1, sizeof(BlowfishContext));
+}
+
+/* Unnitialize */
+
+SILC_CIPHER_API_UNINIT(blowfish_cbc)
+{
+ BlowfishContext *b = context;
+ memset(b, 0, sizeof(*b));
+ silc_free(b);
}
/* Encrypts with the cipher in CBC mode. Source and destination buffers
}
/* Encrypts with the cipher in CBC mode. Source and destination buffers