From 9084f331617899f8afd75510fea7fd389a4ff2a6 Mon Sep 17 00:00:00 2001 From: Tee Teoh Date: Mon, 4 Jun 2007 16:02:47 -0400 Subject: [PATCH] Increase number of functions to 33 --- lib/crypto/c_src/crypto_drv.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/crypto/c_src/crypto_drv.c b/lib/crypto/c_src/crypto_drv.c index 6499989..d54aac9 100644 --- a/lib/crypto/c_src/crypto_drv.c +++ b/lib/crypto/c_src/crypto_drv.c @@ -124,7 +124,7 @@ static ErlDrvData driver_data = (ErlDrvData) &erlang_port; /* Anything goes */ #define DRV_SHA512_FINAL 33 /* need to increment this to match */ -#define NUM_CRYPTO_FUNCS 29 +#define NUM_CRYPTO_FUNCS 33 #define MD5_CTX_LEN (sizeof(MD5_CTX)) #define MD5_LEN 16 @@ -313,9 +313,9 @@ static int control(ErlDrvData drv_data, unsigned int command, char *buf, case DRV_SHA256_FINAL: if (len != SHA256_CTX_LEN) return -1; - memcpy(&sha_ctx, buf, SHA256_CTX_LEN); /* XXX Use buf only? */ + memcpy(&sha256_ctx, buf, SHA256_CTX_LEN); /* XXX Use buf only? */ *rbuf = (char *)(bin = driver_alloc_binary(SHA256_LEN)); - SHA256_Final(bin->orig_bytes, &sha_ctx); + SHA256_Final(bin->orig_bytes, &sha256_ctx); return SHA256_LEN; break; @@ -344,9 +344,9 @@ static int control(ErlDrvData drv_data, unsigned int command, char *buf, case DRV_SHA512_FINAL: if (len != SHA512_CTX_LEN) return -1; - memcpy(&sha_ctx, buf, SHA512_CTX_LEN); /* XXX Use buf only? */ + memcpy(&sha512_ctx, buf, SHA512_CTX_LEN); /* XXX Use buf only? */ *rbuf = (char *)(bin = driver_alloc_binary(SHA512_LEN)); - SHA512_Final(bin->orig_bytes, &sha_ctx); + SHA512_Final(bin->orig_bytes, &sha512_ctx); return SHA512_LEN; break; -- 1.5.2