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

Function BIP32Hash

src/hash.cpp:76–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void BIP32Hash(const ChainCode chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64])
77{
78 unsigned char num[4];
79 num[0] = (nChild >> 24) & 0xFF;
80 num[1] = (nChild >> 16) & 0xFF;
81 num[2] = (nChild >> 8) & 0xFF;
82 num[3] = (nChild >> 0) & 0xFF;
83 CHMAC_SHA512(chainCode.begin(), chainCode.size()).Write(&header, 1).Write(data, 32).Write(num, 4).Finalize(output);
84}
85
86void scrypt_hash(const char* pass, unsigned int pLen, const char* salt, unsigned int sLen, char* output, unsigned int N, unsigned int r, unsigned int p, unsigned int dkLen)
87{

Callers 2

DeriveMethod · 0.85
DeriveMethod · 0.85

Calls 5

CHMAC_SHA512Class · 0.85
FinalizeMethod · 0.45
WriteMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected