mirror of
https://github.com/monero-project/monero.git
synced 2025-08-08 20:02:22 -04:00
crypto: revert odd namespace changes made in #3303
This commit is contained in:
parent
8705beaf51
commit
b2d23b189e
3 changed files with 7 additions and 16 deletions
|
@ -33,7 +33,7 @@
|
|||
#include "crypto-tests.h"
|
||||
|
||||
bool check_scalar(const crypto::ec_scalar &scalar) {
|
||||
return sc_check(crypto::operator &(scalar)) == 0;
|
||||
return crypto::sc_check(crypto::operator &(scalar)) == 0;
|
||||
}
|
||||
|
||||
void random_scalar(crypto::ec_scalar &res) {
|
||||
|
@ -45,13 +45,13 @@ void hash_to_scalar(const void *data, std::size_t length, crypto::ec_scalar &res
|
|||
}
|
||||
|
||||
void hash_to_point(const crypto::hash &h, crypto::ec_point &res) {
|
||||
ge_p2 point;
|
||||
ge_fromfe_frombytes_vartime(&point, reinterpret_cast<const unsigned char *>(&h));
|
||||
ge_tobytes(crypto::operator &(res), &point);
|
||||
crypto::ge_p2 point;
|
||||
crypto::ge_fromfe_frombytes_vartime(&point, reinterpret_cast<const unsigned char *>(&h));
|
||||
crypto::ge_tobytes(crypto::operator &(res), &point);
|
||||
}
|
||||
|
||||
void hash_to_ec(const crypto::public_key &key, crypto::ec_point &res) {
|
||||
ge_p3 tmp;
|
||||
crypto::ge_p3 tmp;
|
||||
crypto::hash_to_ec(key, tmp);
|
||||
ge_p3_tobytes(crypto::operator &(res), &tmp);
|
||||
crypto::ge_p3_tobytes(crypto::operator &(res), &tmp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue