Elixir, Bitcoin, Testing, Software Development, Programming.
let’s update our property test to truncate all generated binaries to the nearest thirty two bits: check all bytes <- binary(min_length: 16, max_length: 32), bits_to_truncate = bytes |> bit_size |> rem(32), <<_::size(bits_to_truncate), data::bits>> = bytes do mnemonic = Bip39.Mnemonic.encode(data)