Include openssl/chacha.h rather than duplicate the prototype.
Less chance of problems should the prototype ever change. This doesn't make it any more or less a circular dependency. (It actually isn't; crypto/chacha doesn't use crypto/rand and CMakeLists.txt actually puts rand above chacha anyway.) Change-Id: Ia80289f801f76551737233f158755aac99ddd74a Reviewed-on: https://boringssl-review.googlesource.com/5262 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
7e5f5944c8
commit
1db476e7a5
@ -17,6 +17,7 @@
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/chacha.h>
|
||||
#include <openssl/mem.h>
|
||||
|
||||
#include "internal.h"
|
||||
@ -69,10 +70,6 @@ static void rand_thread_state_free(void *state) {
|
||||
OPENSSL_free(state);
|
||||
}
|
||||
|
||||
extern void CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len,
|
||||
const uint8_t key[32], const uint8_t nonce[8],
|
||||
size_t counter);
|
||||
|
||||
int RAND_bytes(uint8_t *buf, size_t len) {
|
||||
if (len == 0) {
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user