Commit a89475d
committed
Use little-endian encoding for Blake2 hashing on all architectures
Like many hash functions, the blake2 hash is mathematically defined on
a sequence of 64-bit words. As Rust's hash interface operates on
sequences of octets, some encoding must be used to bridge that
difference.
The Blake2 RFC (RFC 7693) specifies that:
Byte (octet) streams are interpreted as words in little-endian order,
with the least-significant byte first.
So use that encoding consistently.
Fixes #38891.1 parent 7ef1a69 commit a89475d
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | | - | |
123 | | - | |
124 | 127 | | |
125 | 128 | | |
126 | | - | |
| 129 | + | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| |||
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
212 | 218 | | |
213 | | - | |
214 | | - | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
0 commit comments