Skip to content

Commit ddb91d0

Browse files
committed
fixup compressor endianness handling
1 parent cb521a4 commit ddb91d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blake2/src/blake2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ macro_rules! blake2_compressor_impl {
8484
pub fn build(&self) -> $compressor {
8585
assert!(self.digest_len > 0);
8686
// All fields of both types are Copy.
87-
// Endianness is handled at field-setting time.
87+
// Field endianness is handled at field-setting time.
8888
let h0: [$vec; 2] = unsafe { mem::transmute(*self) };
8989
$compressor {
90-
h: [iv0() ^ h0[0], iv1() ^ h0[1]],
90+
h: [iv0() ^ h0[0].to_le(), iv1() ^ h0[1].to_le()],
9191
}
9292
}
9393
}

0 commit comments

Comments
 (0)