From 845615cdd87acc892ec6a28930b5510d52e802fe Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 17 Apr 2009 12:52:27 +0000 Subject: Add return values to set_encrypt_key and set_decrypt_key. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@519 7dcaeef0-15fb-0310-b436-a5af3365683c --- include/libssh/crypto.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'include/libssh') diff --git a/include/libssh/crypto.h b/include/libssh/crypto.h index a59dab1f..75b0a737 100644 --- a/include/libssh/crypto.h +++ b/include/libssh/crypto.h @@ -54,15 +54,21 @@ struct crypto_struct { #endif unsigned int keysize; /* bytes of key used. != keylen */ #ifdef HAVE_LIBGCRYPT - void (*set_encrypt_key)(struct crypto_struct *cipher, void *key, void *IV); /* sets the new key for immediate use */ - void (*set_decrypt_key)(struct crypto_struct *cipher, void *key, void *IV); - void (*cbc_encrypt)(struct crypto_struct *cipher, void *in, void *out,unsigned long len); - void (*cbc_decrypt)(struct crypto_struct *cipher, void *in, void *out,unsigned long len); + /* sets the new key for immediate use */ + int (*set_encrypt_key)(struct crypto_struct *cipher, void *key, void *IV); + int (*set_decrypt_key)(struct crypto_struct *cipher, void *key, void *IV); + void (*cbc_encrypt)(struct crypto_struct *cipher, void *in, void *out, + unsigned long len); + void (*cbc_decrypt)(struct crypto_struct *cipher, void *in, void *out, + unsigned long len); #elif defined HAVE_LIBCRYPTO - void (*set_encrypt_key)(struct crypto_struct *cipher, void *key); /* sets the new key for immediate use */ - void (*set_decrypt_key)(struct crypto_struct *cipher, void *key); - void (*cbc_encrypt)(struct crypto_struct *cipher, void *in, void *out,unsigned long len,void *IV); - void (*cbc_decrypt)(struct crypto_struct *cipher, void *in, void *out,unsigned long len,void *IV); + /* sets the new key for immediate use */ + int (*set_encrypt_key)(struct crypto_struct *cipher, void *key); + int (*set_decrypt_key)(struct crypto_struct *cipher, void *key); + void (*cbc_encrypt)(struct crypto_struct *cipher, void *in, void *out, + unsigned long len, void *IV); + void (*cbc_decrypt)(struct crypto_struct *cipher, void *in, void *out, + unsigned long len, void *IV); #endif }; -- cgit