diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/hmac | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) |
Change functions to ANSI C.
Diffstat (limited to 'crypto/hmac')
-rw-r--r-- | crypto/hmac/hmac.c | 29 | ||||
-rw-r--r-- | crypto/hmac/hmactest.c | 7 |
2 files changed, 8 insertions, 28 deletions
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c index ead5f649f8..64c5162130 100644 --- a/crypto/hmac/hmac.c +++ b/crypto/hmac/hmac.c @@ -60,11 +60,7 @@ #include <string.h> #include "hmac.h" -void HMAC_Init(ctx,key,len,md) -HMAC_CTX *ctx; -unsigned char *key; -int len; -const EVP_MD *md; +void HMAC_Init(HMAC_CTX *ctx, unsigned char *key, int len, const EVP_MD *md) { int i,j,reset=0; unsigned char pad[HMAC_MAX_MD_CBLOCK]; @@ -112,18 +108,12 @@ const EVP_MD *md; memcpy(&ctx->md_ctx,&ctx->i_ctx,sizeof(ctx->i_ctx)); } -void HMAC_Update(ctx,data,len) -HMAC_CTX *ctx; -unsigned char *data; -int len; +void HMAC_Update(HMAC_CTX *ctx, unsigned char *data, int len) { EVP_DigestUpdate(&(ctx->md_ctx),data,len); } -void HMAC_Final(ctx,md,len) -HMAC_CTX *ctx; -unsigned char *md; -unsigned int *len; +void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len) { int j; unsigned int i; @@ -137,20 +127,13 @@ unsigned int *len; EVP_DigestFinal(&(ctx->md_ctx),md,len); } -void HMAC_cleanup(ctx) -HMAC_CTX *ctx; +void HMAC_cleanup(HMAC_CTX *ctx) { memset(ctx,0,sizeof(HMAC_CTX)); } -unsigned char *HMAC(evp_md,key,key_len,d,n,md,md_len) -EVP_MD *evp_md; -unsigned char *key; -int key_len; -unsigned char *d; -int n; -unsigned char *md; -unsigned int *md_len; +unsigned char *HMAC(EVP_MD *evp_md, unsigned char *key, int key_len, + unsigned char *d, int n, unsigned char *md, unsigned int *md_len) { HMAC_CTX c; static unsigned char m[EVP_MAX_MD_SIZE]; diff --git a/crypto/hmac/hmactest.c b/crypto/hmac/hmactest.c index 5938e375dc..13b3946348 100644 --- a/crypto/hmac/hmactest.c +++ b/crypto/hmac/hmactest.c @@ -108,9 +108,7 @@ static char *pt(unsigned char *md); static char *pt(); #endif -int main(argc,argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i,err=0; char *p; @@ -135,8 +133,7 @@ char *argv[]; return(0); } -static char *pt(md) -unsigned char *md; +static char *pt(unsigned char *md) { int i; static char buf[80]; |