Skip to content

Commit 44ef648

Browse files
fixup: improve detection
1 parent e1ed27c commit 44ef648

File tree

3 files changed

+231
-229
lines changed

3 files changed

+231
-229
lines changed

sha2/src/platform.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ impl Implementation {
5757
return Some(Implementation(Platform::Asm));
5858
}
5959

60+
#[inline]
6061
pub fn compress256(&self, state: &mut [u32; 8], block: &[u8; 64]) {
6162
match self.0 {
6263
Platform::Portable => {
@@ -66,7 +67,7 @@ impl Implementation {
6667
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
6768
Platform::Sha => {
6869
use sha256_intrinsics;
69-
sha256_intrinsics::compress256(state, block);
70+
unsafe { sha256_intrinsics::compress256(state, block) };
7071
}
7172
#[cfg(feature = "asm")]
7273
Platform::Asm => {

0 commit comments

Comments
 (0)