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
/
cast.c
diff --git
a/lib/silccrypt/cast.c
b/lib/silccrypt/cast.c
index 65b9f1d29ce5caa9ce9c259d4db71c9a8944427a..ac8aa770b50d60daff1474a079c66ee258335102 100644
(file)
--- a/
lib/silccrypt/cast.c
+++ b/
lib/silccrypt/cast.c
@@
-58,7
+58,7
@@
Mean: 674 cycles = 38.0 mbits/sec
*/
*/
-#include "silc.h"
+#include "silc
crypto
.h"
#include "cast_internal.h"
#include "cast.h"
#include "cast_internal.h"
#include "cast.h"
@@
-87,11
+87,20
@@
SILC_CIPHER_API_SET_IV(cast_cbc)
}
}
-/*
Returns the size of the cipher context.
*/
+/*
Initialize
*/
-SILC_CIPHER_API_
CONTEXT_LEN
(cast_cbc)
+SILC_CIPHER_API_
INIT
(cast_cbc)
{
{
- return sizeof(CastContext);
+ return silc_calloc(1, sizeof(CastContext));
+}
+
+/* Uninitialize */
+
+SILC_CIPHER_API_UNINIT(cast_cbc)
+{
+ CastContext *cast = context;
+ memset(cast, 0, sizeof(*cast));
+ silc_free(cast);
}
/* Encrypts with the cipher in CBC mode. Source and destination buffers
}
/* Encrypts with the cipher in CBC mode. Source and destination buffers