Commit fea0fc2
committed
Truncate secret hash
The `hex-conservative` crate does not truncate hashes when printed with
the `fmt` precision format parameter, this is as expected since a hash
is a 32 byte integer (I think) and for integral types precision is
ignorded.
Add a private struct to handle truncating, and truncate the hash to an 8
byte identifier.1 parent 789f384 commit fea0fc2
1 file changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
50 | 72 | | |
51 | 73 | | |
52 | 74 | | |
| |||
0 commit comments