mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
da8fc25a98
Remove unused rand_hw_xor, MD/EVP indirection Make rand_pseudo same as rand. Cleanup formatting and ifdef control Rename some things: - rand_meth to openssl_rand_meth; make it global - source file - lock/init functions, start per-thread state - ossl_meth_init to ossl_rand_init Put state into RAND_STATE structure And put OSSL_RAND_STATE into ossl_typ.h Use "randomness" instead of "entropy" Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3758)
25 lines
651 B
C
25 lines
651 B
C
/*
|
|
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
*
|
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
* in the file LICENSE in the source distribution or at
|
|
* https://www.openssl.org/source/license.html
|
|
*/
|
|
|
|
#ifndef HEADER_RAND_LCL_H
|
|
# define HEADER_RAND_LCL_H
|
|
|
|
/* we require 256 bits of randomness */
|
|
# define RANDOMNESS_NEEDED (256 / 8)
|
|
|
|
# include <openssl/evp.h>
|
|
# include <openssl/sha.h>
|
|
|
|
# define RAND_DIGEST EVP_sha1()
|
|
# define RAND_DIGEST_LENGTH SHA_DIGEST_LENGTH
|
|
|
|
extern RAND_METHOD openssl_rand_meth;
|
|
|
|
#endif
|