aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-17 12:52:27 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-17 12:52:27 +0000
commit845615cdd87acc892ec6a28930b5510d52e802fe (patch)
tree3d3b8b4f2106de6f5481296eee04b04d61e6c6dc /include
parent32fd37d1ad88e18db9322b626893e34d318b4172 (diff)
downloadlibssh-845615cdd87acc892ec6a28930b5510d52e802fe.tar.gz
libssh-845615cdd87acc892ec6a28930b5510d52e802fe.tar.xz
libssh-845615cdd87acc892ec6a28930b5510d52e802fe.zip
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
Diffstat (limited to 'include')
-rw-r--r--include/libssh/crypto.h22
1 files changed, 14 insertions, 8 deletions
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
};