MCPcopy Create free account
hub / github.com/LUX-Core/lux / ComputePreFactor

Function ComputePreFactor

src/bip38.cpp:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void ComputePreFactor(std::string strPassphrase, std::string strSalt, uint256& prefactor)
38{
39 //passfactor is the scrypt hash of passphrase and ownersalt (NOTE this needs to handle alt cases too in the future)
40 uint64_t s = uint256(ReverseEndianString(strSalt)).Get64();
41 scrypt_hash(strPassphrase.c_str(), strPassphrase.size(), BEGIN(s), strSalt.size() / 2, BEGIN(prefactor), 16384, 8, 8, 32);
42}
43
44void ComputePassfactor(std::string ownersalt, uint256 prefactor, uint256& passfactor)
45{

Callers 1

BIP38_DecryptFunction · 0.85

Calls 5

ReverseEndianStringFunction · 0.85
scrypt_hashFunction · 0.85
Get64Method · 0.80
uint256Class · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected