Repository navigation
Commit 13f3c20
committed
Reject non-canonical Bitcoin Cash CashAddr addresses
A CashAddr with non-zero padding bits or one extra 5-bit group and a valid checksum decoded to the same hash as the canonical address. The decoder now re-encodes the payload and rejects any input that differs, as the reference implementation does.1 parent 9f610b2 commit 13f3c20
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| |||
0 commit comments