aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-11-30 17:23:37 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-11-30 18:25:12 +0100
commitc6ca62d7e166271a8470fa7e327b03845a0c1f3f (patch)
tree590dab12dca4f6976d37f0c384d6ff85e65677c5 /include
parent6d3672911bcd5fbe85967f8e16ac29aca53d6549 (diff)
downloadlibssh-c6ca62d7e166271a8470fa7e327b03845a0c1f3f.tar.gz
libssh-c6ca62d7e166271a8470fa7e327b03845a0c1f3f.tar.xz
libssh-c6ca62d7e166271a8470fa7e327b03845a0c1f3f.zip
crypto: Use size_t for len argument in encrypt and decrpyt fn
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/crypto.h12
1 files changed, 8 insertions, 4 deletions
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,