View Source Slip39.Rs1024 (slip39 v0.1.1)
Summary
Functions
Create a checksum (see spec). Data passed as argument should be a bitstring of multiple of radix_size, that is 10
Verify that the given data, included at the end of the data, is valid (see spec).
Functions
Create a checksum (see spec). Data passed as argument should be a bitstring of multiple of radix_size, that is 10
iex(1)> Slip39.Rs1024.create_checksum("Long life to Elixir!")
<<183, 154, 93, 32::size(6)>>
Verify that the given data, included at the end of the data, is valid (see spec).
iex(1)> checksum = Slip39.Rs1024.create_checksum("Long life to Elixir!")
<<183, 154, 93, 32::size(6)>>
iex(2)> Slip39.Rs1024.is_checksum_valid?(<<"Long life to Elixir!"::bitstring, checksum::bitstring>>)
true
iex(3)> Slip39.Rs1024.is_checksum_valid?(<<"Long life to Elixir?"::bitstring, checksum::bitstring>>)
false