From c6ca62d7e166271a8470fa7e327b03845a0c1f3f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 30 Nov 2018 17:23:37 +0100 Subject: crypto: Use size_t for len argument in encrypt and decrpyt fn Signed-off-by: Andreas Schneider --- include/libssh/crypto.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/libssh/crypto.h b/include/libssh/crypto.h index 9eea580b..454dacf7 100644 --- a/include/libssh/crypto.h +++ b/include/libssh/crypto.h @@ -165,10 +165,14 @@ struct ssh_cipher_struct { /* sets the new key for immediate use */ int (*set_encrypt_key)(struct ssh_cipher_struct *cipher, void *key, void *IV); int (*set_decrypt_key)(struct ssh_cipher_struct *cipher, void *key, void *IV); - void (*encrypt)(struct ssh_cipher_struct *cipher, void *in, void *out, - unsigned long len); - void (*decrypt)(struct ssh_cipher_struct *cipher, void *in, void *out, - unsigned long len); + void (*encrypt)(struct ssh_cipher_struct *cipher, + void *in, + void *out, + size_t len); + void (*decrypt)(struct ssh_cipher_struct *cipher, + void *in, + void *out, + size_t len); void (*aead_encrypt)(struct ssh_cipher_struct *cipher, void *in, void *out, size_t len, uint8_t *mac, uint64_t seq); int (*aead_decrypt_length)(struct ssh_cipher_struct *cipher, void *in, -- cgit v1.2.3