mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28:30 +00:00
Rename rand64() to _rand64()
This commit is contained in:
parent
c424352a0a
commit
7ae556463a
52 changed files with 141 additions and 139 deletions
8
third_party/mbedtls/test/everest_test.c
vendored
8
third_party/mbedtls/test/everest_test.c
vendored
|
@ -47,8 +47,8 @@ TEST(everest, tinierVersionBehavesTheSame) {
|
|||
size_t i;
|
||||
uint8_t secret[32], bpoint[32], public[2][32];
|
||||
for (i = 0; i < 500; ++i) {
|
||||
rngset(secret, sizeof(secret), rand64, -1);
|
||||
rngset(bpoint, sizeof(bpoint), rand64, -1);
|
||||
rngset(secret, sizeof(secret), _rand64, -1);
|
||||
rngset(bpoint, sizeof(bpoint), _rand64, -1);
|
||||
Hacl_Curve25519_crypto_scalarmult(public[0], secret, bpoint);
|
||||
curve25519(public[1], secret, bpoint);
|
||||
ASSERT_EQ(0, memcmp(public[0], public[1], sizeof(public[0])));
|
||||
|
@ -70,8 +70,8 @@ TEST(everest, tinierVersionBehavesTheSame) {
|
|||
|
||||
BENCH(everest, bench) {
|
||||
uint8_t secret[32], bpoint[32], public[32];
|
||||
rngset(secret, sizeof(secret), rand64, -1);
|
||||
rngset(bpoint, sizeof(bpoint), rand64, -1);
|
||||
rngset(secret, sizeof(secret), _rand64, -1);
|
||||
rngset(bpoint, sizeof(bpoint), _rand64, -1);
|
||||
EZBENCH2("everest", donothing,
|
||||
Hacl_Curve25519_crypto_scalarmult(public, secret, bpoint));
|
||||
EZBENCH2("mariana", donothing, curve25519(public, secret, bpoint));
|
||||
|
|
2
third_party/mbedtls/test/secp384r1_test.c
vendored
2
third_party/mbedtls/test/secp384r1_test.c
vendored
|
@ -32,7 +32,7 @@
|
|||
int ecp_mod_p384_old(mbedtls_mpi *);
|
||||
|
||||
int GetEntropy(void *c, unsigned char *p, size_t n) {
|
||||
rngset(p, n, rand64, -1);
|
||||
rngset(p, n, _rand64, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
4
third_party/mbedtls/test/test_suite_ssl.c
vendored
4
third_party/mbedtls/test/test_suite_ssl.c
vendored
|
@ -3709,7 +3709,7 @@ void test_ssl_decrypt_non_etm_cbc( int cipher_type, int hash_id, int trunc_hmac,
|
|||
* hundreds of milliseconds of latency, which we can't have in our pure
|
||||
* testing infrastructure.
|
||||
*/
|
||||
for( i = block_size; i < buflen; i += max( 1, rand64() & 31 ) )
|
||||
for( i = block_size; i < buflen; i += max( 1, _rand64() & 31 ) )
|
||||
{
|
||||
mbedtls_test_set_step( i );
|
||||
/* Restore correct pre-encryption record */
|
||||
|
@ -3747,7 +3747,7 @@ void test_ssl_decrypt_non_etm_cbc( int cipher_type, int hash_id, int trunc_hmac,
|
|||
* hundreds of milliseconds of latency, which we can't have in our pure
|
||||
* testing infrastructure.
|
||||
*/
|
||||
for( i = padlen; i <= pad_max_len; i += max( 1, rand64() & 31 ) )
|
||||
for( i = padlen; i <= pad_max_len; i += max( 1, _rand64() & 31 ) )
|
||||
{
|
||||
mbedtls_test_set_step( i );
|
||||
/* Restore correct pre-encryption record */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue