mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
ringct: add a few consts where possible
This commit is contained in:
parent
ab002a1d97
commit
1fe75c1ea7
1 changed files with 4 additions and 4 deletions
|
@ -320,7 +320,7 @@ namespace rct {
|
||||||
//be careful these are also in crypto namespace
|
//be careful these are also in crypto namespace
|
||||||
//cn_fast_hash for arbitrary multiples of 32 bytes
|
//cn_fast_hash for arbitrary multiples of 32 bytes
|
||||||
void cn_fast_hash(key &hash, const void * data, const std::size_t l) {
|
void cn_fast_hash(key &hash, const void * data, const std::size_t l) {
|
||||||
keccak((uint8_t *)data, l, hash.bytes, 32);
|
keccak((const uint8_t *)data, l, hash.bytes, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hash_to_scalar(key &hash, const void * data, const std::size_t l) {
|
void hash_to_scalar(key &hash, const void * data, const std::size_t l) {
|
||||||
|
@ -330,7 +330,7 @@ namespace rct {
|
||||||
|
|
||||||
//cn_fast_hash for a 32 byte key
|
//cn_fast_hash for a 32 byte key
|
||||||
void cn_fast_hash(key & hash, const key & in) {
|
void cn_fast_hash(key & hash, const key & in) {
|
||||||
keccak((uint8_t *)in.bytes, 32, hash.bytes, 32);
|
keccak((const uint8_t *)in.bytes, 32, hash.bytes, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hash_to_scalar(key & hash, const key & in) {
|
void hash_to_scalar(key & hash, const key & in) {
|
||||||
|
@ -341,7 +341,7 @@ namespace rct {
|
||||||
//cn_fast_hash for a 32 byte key
|
//cn_fast_hash for a 32 byte key
|
||||||
key cn_fast_hash(const key & in) {
|
key cn_fast_hash(const key & in) {
|
||||||
key hash;
|
key hash;
|
||||||
keccak((uint8_t *)in.bytes, 32, hash.bytes, 32);
|
keccak((const uint8_t *)in.bytes, 32, hash.bytes, 32);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ namespace rct {
|
||||||
//cn_fast_hash for a 128 byte unsigned char
|
//cn_fast_hash for a 128 byte unsigned char
|
||||||
key cn_fast_hash128(const void * in) {
|
key cn_fast_hash128(const void * in) {
|
||||||
key hash;
|
key hash;
|
||||||
keccak((uint8_t *)in, 128, hash.bytes, 32);
|
keccak((const uint8_t *)in, 128, hash.bytes, 32);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue