View Source BitcoinLib.Key.HD.SeedPhrase.Checksum (BitcoinLib v0.4.7)
Checksum needed to generate a seed phrase
Source: https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt
Link to this section Summary
Functions
Computes the checksum, which is the first few bits of a SHA256 hash
Adds checksum at the end of the seed
Computes the checksum, and verify that it matches to the one received
Link to this section Functions
Computes the checksum, which is the first few bits of a SHA256 hash
examples
Examples
iex> <<27, 172, 62, 126, 195, 84, 6, 180, 26, 1, 13, 250, 0, 254, 239, 132>>
...> |> BitcoinLib.Key.HD.SeedPhrase.Checksum.compute(4)
2
Adds checksum at the end of the seed
Computes the checksum, and verify that it matches to the one received
examples
Examples
iex> <<5, 235, 104, 86, 249, 249, 27, 246, 234, 99, 13, 18, 209, 116, 50, 248, 35>>
...> |> BitcoinLib.Key.HD.SeedPhrase.Checksum.validate_seed()
true