diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-11-19 23:26:27 +0200 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-11-20 18:43:46 +0200 |
commit | 2d870a9142e8c8b3f008e1ad8e83e4bdf7a8e4e7 (patch) | |
tree | 87a56516fcd6945a1ff0d938d8c7e52621b81d7b /cipher/cipher-internal.h | |
parent | 56d352d6bdcf7abaa33c3399741f5063e2ddc32a (diff) | |
download | libgcrypt-2d870a9142e8c8b3f008e1ad8e83e4bdf7a8e4e7.tar.gz |
GCM: Use size_t for buffer sizes
* cipher/cipher-gcm.c (ghash, gcm_bytecounter_add, do_ghash_buf)
(_gcry_cipher_gcm_encrypt, _gcry_cipher_gcm_decrypt)
(_gcry_cipher_gcm_authenticate, _gcry_cipher_gcm_geniv)
(_gcry_cipher_gcm_tag): Use size_t for buffer lengths.
* cipher/cipher-internal.h (_gcry_cipher_gcm_encrypt)
(_gcry_cipher_gcm_decrypt, _gcry_cipher_gcm_authenticate): Use size_t
for buffer lengths.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/cipher-internal.h')
-rw-r--r-- | cipher/cipher-internal.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cipher/cipher-internal.h b/cipher/cipher-internal.h index fced20c5..225f6993 100644 --- a/cipher/cipher-internal.h +++ b/cipher/cipher-internal.h @@ -273,21 +273,22 @@ gcry_err_code_t _gcry_cipher_ccm_check_tag /* */ (gcry_cipher_hd_t c, const unsigned char *intag, size_t taglen); + /*-- cipher-gcm.c --*/ gcry_err_code_t _gcry_cipher_gcm_encrypt /* */ (gcry_cipher_hd_t c, - unsigned char *outbuf, unsigned int outbuflen, - const unsigned char *inbuf, unsigned int inbuflen); + unsigned char *outbuf, size_t outbuflen, + const unsigned char *inbuf, size_t inbuflen); gcry_err_code_t _gcry_cipher_gcm_decrypt /* */ (gcry_cipher_hd_t c, - unsigned char *outbuf, unsigned int outbuflen, - const unsigned char *inbuf, unsigned int inbuflen); + unsigned char *outbuf, size_t outbuflen, + const unsigned char *inbuf, size_t inbuflen); gcry_err_code_t _gcry_cipher_gcm_setiv /* */ (gcry_cipher_hd_t c, const unsigned char *iv, size_t ivlen); gcry_err_code_t _gcry_cipher_gcm_authenticate /* */ (gcry_cipher_hd_t c, - const unsigned char *aadbuf, unsigned int aadbuflen); + const unsigned char *aadbuf, size_t aadbuflen); gcry_err_code_t _gcry_cipher_gcm_get_tag /* */ (gcry_cipher_hd_t c, unsigned char *outtag, size_t taglen); |