From bc41b879d5f8d2286f094d85222d0d40b90ace00 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sat, 15 Jun 2013 20:13:59 +0200 Subject: curve: curve25519_tfm_alloc/curve25519_tfm_free helpers Facilitate allocation and destruction of crypto objects through common helper functions. Signed-off-by: Daniel Borkmann --- curve.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'curve.h') diff --git a/curve.h b/curve.h index d9c2584..1b3a919 100644 --- a/curve.h +++ b/curve.h @@ -21,8 +21,11 @@ struct curve25519_struct { }; extern void curve25519_selftest(void); -extern void curve25519_alloc_or_maybe_die(struct curve25519_struct *curve); -extern void curve25519_free(void *curve); + +extern struct curve25519_struct *curve25519_tfm_alloc(void); +extern void curve25519_tfm_free(struct curve25519_struct *tfm); +extern void curve25519_tfm_free_void(void *tfm); + extern void curve25519_proto_init(struct curve25519_proto *proto, unsigned char *pubkey_remote, size_t len); extern int curve25519_pubkey_hexparse_32(unsigned char *bin, size_t blen, -- cgit v1.2.3-54-g00ecf