Skip to content

Commit 5b47695

Browse files
committed
Add panic for non shani path
1 parent 89b91e3 commit 5b47695

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sha2/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ pub fn get_cpuid(info: u32) -> CpuidResult {
3939
pub fn compress256(state: &mut [u32; 8], block: &[u8; 64]) {
4040
let x = get_cpuid(0x7);
4141
if x.ebx & (1 << 29) != 0 {
42+
panic!("bar!");
4243
compress256_shani(state, block);
4344
} else {
45+
panic!("foo!");
4446
unsafe { sha256_compress(state, block) };
4547
}
4648
}

0 commit comments

Comments
 (0)