mirror of
https://github.com/GOSTSec/poolserver
synced 2025-01-15 01:00:10 +00:00
convert to Litte Endian
This commit is contained in:
parent
32ae9c3291
commit
80df4b0900
@ -8,11 +8,10 @@ namespace Crypto
|
|||||||
uint8_t hash1[64], hash2[32];
|
uint8_t hash1[64], hash2[32];
|
||||||
i2p::crypto::GOSTR3411_2012_512 (&data[0], data.size (), hash1);
|
i2p::crypto::GOSTR3411_2012_512 (&data[0], data.size (), hash1);
|
||||||
i2p::crypto::GOSTR3411_2012_256 (hash1, 64, hash2);
|
i2p::crypto::GOSTR3411_2012_256 (hash1, 64, hash2);
|
||||||
std::vector<byte> hash(32);
|
std::vector<byte> hash;
|
||||||
// To Little Endian. TODO implement faster
|
// To Little Endian. TODO implement faster
|
||||||
for (int i = 0; i < 32; i++)
|
for (int i = 0; i < 32; i++)
|
||||||
hash[i] = hash2[31-i];
|
hash.push_back (hash2[31-i]);
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user