Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::equihash Namespace Reference

Classes

struct  proof
 

Functions

_POW::Seed sha_to_seed (sha256 seed)
 

Function Documentation

◆ sha_to_seed()

_POW::Seed fc::equihash::sha_to_seed ( sha256 seed)

Definition at line 9 of file equihash.cpp.

10 {
11 _POW::Seed new_seed;
12
13 // Seed is 128 bits. Half of sha256 to create seed. Should still have enough randomness
14 new_seed.v[0] = (unsigned int) seed._hash[0];
15 new_seed.v[0] ^= (unsigned int) seed._hash[2];
16 new_seed.v[1] = (unsigned int)( seed._hash[0] >> 32 );
17 new_seed.v[1] ^= (unsigned int)( seed._hash[2] >> 32 );
18 new_seed.v[2] = (unsigned int) seed._hash[1];
19 new_seed.v[2] ^= (unsigned int) seed._hash[3];
20 new_seed.v[3] = (unsigned int)( seed._hash[1] >> 32 );
21 new_seed.v[3] ^= (unsigned int)( seed._hash[3] >> 32 );
22
23 return new_seed;
24 }
uint64_t _hash[4]
Definition sha256.hpp:100
Here is the caller graph for this function: