Closed AArnott closed 1 year ago
Per the spec, the checksum is correct when the PolyMod result is 1.
PolyMod
def bech32_verify_checksum(hrp, data): return bech32_polymod(bech32_hrp_expand(hrp) + data) == 1
But in your code you equate it to 0:
https://github.com/DesWurstes/Bech32-Csharp/blob/7e3ef04e26934f787c81c103a336373ac9bbf8d8/Bech32-Csharp/Bech32-Csharp.cs#L93
Per the spec, the checksum is correct when the
PolyMod
result is 1.But in your code you equate it to 0:
https://github.com/DesWurstes/Bech32-Csharp/blob/7e3ef04e26934f787c81c103a336373ac9bbf8d8/Bech32-Csharp/Bech32-Csharp.cs#L93