diff options
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r-- | src/common/crypto.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h index e35c8e74c..b58b300a4 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -5,11 +5,8 @@ #ifndef __CRYPTO_H #define __CRYPTO_H -#include <openssl/err.h> +#include <stdio.h> #include <openssl/rsa.h> -#include <openssl/pem.h> -#include <openssl/evp.h> -#include <openssl/rand.h> /* available encryption primitives */ #define CRYPTO_CIPHER_IDENTITY 0 @@ -54,13 +51,17 @@ int crypto_pk_read_public_key(crypto_pk_env_t *env, FILE *src); int crypto_pk_write_private_key(crypto_pk_env_t *env, FILE *dest); int crypto_pk_write_public_key(crypto_pk_env_t *env, FILE *dest); int crypto_pk_check_key(crypto_pk_env_t *env); +int crypto_pk_read_private_key_filename(crypto_pk_env_t *env, unsigned char *keyfile); int crypto_pk_set_key(crypto_pk_env_t *env, unsigned char *key); +int crypto_pk_cmp_keys(crypto_pk_env_t *a, crypto_pk_env_t *b); +int crypto_pk_keysize(crypto_pk_env_t *env); int crypto_pk_public_encrypt(crypto_pk_env_t *env, unsigned char *from, int fromlen, unsigned char *to, int padding); int crypto_pk_private_decrypt(crypto_pk_env_t *env, unsigned char *from, int fromlen, unsigned char *to, int padding); /* symmetric crypto */ +int crypto_cipher_generate_key(crypto_cipher_env_t *env); int crypto_cipher_set_iv(crypto_cipher_env_t *env, unsigned char *iv); int crypto_cipher_set_key(crypto_cipher_env_t *env, unsigned char *key); int crypto_cipher_encrypt_init_cipher(crypto_cipher_env_t *env); |