diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-24 02:14:38 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-24 04:25:24 +0200 |
commit | 52e90afd006bec2a072c00cae8945e606f43da66 (patch) | |
tree | 9c5720d01c2f779319931e31603e3e953bf9f8a0 /libtomcrypt/headers/tomcrypt_pk.h | |
parent | d11063f50e61ba5880324908ea6cccb0314f0d46 (diff) | |
download | cryptodev-linux-52e90afd006bec2a072c00cae8945e606f43da66.tar.gz cryptodev-linux-52e90afd006bec2a072c00cae8945e606f43da66.tar.xz cryptodev-linux-52e90afd006bec2a072c00cae8945e606f43da66.zip |
Use algo_properties_st in rsa_encrypt_key_ex
Diffstat (limited to 'libtomcrypt/headers/tomcrypt_pk.h')
-rw-r--r-- | libtomcrypt/headers/tomcrypt_pk.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libtomcrypt/headers/tomcrypt_pk.h b/libtomcrypt/headers/tomcrypt_pk.h index fa6030e..3d2de50 100644 --- a/libtomcrypt/headers/tomcrypt_pk.h +++ b/libtomcrypt/headers/tomcrypt_pk.h @@ -1,5 +1,7 @@ /* ---- NUMBER THEORY ---- */ +struct algo_properties_st; + enum { PK_PUBLIC=0, PK_PRIVATE=1 @@ -57,8 +59,8 @@ int rsa_exptmod(const unsigned char *in, unsigned long inlen, void rsa_free(rsa_key *key); /* These use LTC_PKCS #1 v2.0 padding */ -#define rsa_encrypt_key(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash_idx, _key) \ - rsa_encrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash_idx, LTC_LTC_PKCS_1_OAEP, _key) +#define rsa_encrypt_key(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash, _key) \ + rsa_encrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash, LTC_LTC_PKCS_1_OAEP, _key) #define rsa_decrypt_key(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash_idx, _stat, _key) \ rsa_decrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash_idx, LTC_LTC_PKCS_1_OAEP, _stat, _key) @@ -73,7 +75,7 @@ void rsa_free(rsa_key *key); int rsa_encrypt_key_ex(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, const unsigned char *lparam, unsigned long lparamlen, - int hash_idx, int padding, rsa_key *key); + const struct algo_properties_st *hash, int padding, rsa_key *key); int rsa_decrypt_key_ex(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, |