X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=tom_crypto.c;h=68d8cf23260d1cc9aa04bb86f2217f77925fc37b;hp=b5bed3e06d0fe5da41293903ded63b15f281c8dc;hb=HEAD;hpb=c498f013eeb5a5decd93e5830fa61929e4c650cc diff --git a/tom_crypto.c b/tom_crypto.c index b5bed3e..68d8cf2 100644 --- a/tom_crypto.c +++ b/tom_crypto.c @@ -34,8 +34,8 @@ static const char *tom_init(void) return "tomcrypt"; } -static unsigned long tom_encrypt(const void *key, const int keylen, void *iv, - const void *pt, void *ct, const int tlen) +static unsigned long tom_encrypt(const void *key, const size_t keylen, void *iv, + const void *pt, void *ct, const size_t tlen) { symmetric_CBC cbc; int index, err; @@ -49,8 +49,8 @@ static unsigned long tom_encrypt(const void *key, const int keylen, void *iv, return err; } -static unsigned long tom_decrypt(const void *key, const int keylen, void *iv, - const void *ct, void *pt, const int tlen) +static unsigned long tom_decrypt(const void *key, const size_t keylen, void *iv, + const void *ct, void *pt, const size_t tlen) { symmetric_CBC cbc; int index, err; @@ -64,8 +64,8 @@ static unsigned long tom_decrypt(const void *key, const int keylen, void *iv, return err; } -static unsigned long tom_hash(const void *pt, const int tlen, - void *tag, int *taglen) +static unsigned long tom_hash(const void *pt, const size_t tlen, + void *tag, size_t *taglen) { int index, rc; unsigned long ltaglen = *taglen; @@ -77,9 +77,9 @@ static unsigned long tom_hash(const void *pt, const int tlen, return rc; } -static unsigned long tom_hmac(const void *key, const int keylen, - const void *pt, const int tlen, - void *tag, int *taglen) +static unsigned long tom_hmac(const void *key, const size_t keylen, + const void *pt, const size_t tlen, + void *tag, size_t *taglen) { int index, rc; unsigned long ltaglen = *taglen;