1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-12 15:41:16 +03:00

crypto: Use size_t for len argument in encrypt and decrpyt fn

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-11-30 17:23:37 +01:00
parent 6d3672911b
commit c6ca62d7e1
4 changed files with 52 additions and 28 deletions

View File

@@ -405,14 +405,20 @@ static int aes_set_key(struct ssh_cipher_struct *cipher, void *key, void *IV) {
return 0;
}
static void aes_encrypt(struct ssh_cipher_struct *cipher, void *in, void *out,
unsigned long len) {
gcry_cipher_encrypt(cipher->key[0], out, len, in, len);
static void aes_encrypt(struct ssh_cipher_struct *cipher,
void *in,
void *out,
size_t len)
{
gcry_cipher_encrypt(cipher->key[0], out, len, in, len);
}
static void aes_decrypt(struct ssh_cipher_struct *cipher, void *in, void *out,
unsigned long len) {
gcry_cipher_decrypt(cipher->key[0], out, len, in, len);
static void aes_decrypt(struct ssh_cipher_struct *cipher,
void *in,
void *out,
size_t len)
{
gcry_cipher_decrypt(cipher->key[0], out, len, in, len);
}
static int