diff --git a/rngd_darn.c b/rngd_darn.c index 35df7a1..9345895 100644 --- a/rngd_darn.c +++ b/rngd_darn.c @@ -109,7 +109,7 @@ static int init_openssl(struct rng *ent_src) return 0; } -int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, +static int osslencrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, unsigned char *iv, unsigned char *ciphertext) { int len; @@ -150,7 +150,7 @@ static inline int openssl_mangle(unsigned char *tmp, struct rng *ent_src) unsigned char ciphertext[CHUNK_SIZE * RDRAND_ROUNDS]; /* Encrypt the plaintext */ - ciphertext_len = encrypt (tmp, strlen(tmp), key, iv_buf, + ciphertext_len = osslencrypt (tmp, strlen(tmp), key, iv_buf, ciphertext); printf("Calling mangle with len %d\n", ciphertext_len); if (!ciphertext_len)