MCPcopy Create free account
hub / github.com/BitVM/BitVM / test_shatemp

Function test_shatemp

bitvm/src/hash/sha256_u4_stack.rs:751–766  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

749
750 #[test]
751 fn test_shatemp() {
752 let mut stack = StackTracker::new();
753 stack.custom(
754 script! {
755 {u4_number_to_nibble(0xdeadbeaf)}
756 {u4_number_to_nibble(0x01020304)}
757 },
758 0,
759 false,
760 0,
761 "message",
762 );
763
764 sha256_stack(&mut stack, 8, true, true);
765 stack.run();
766 }
767 pub fn u4_hex_to_nibbles(hex_str: &str) -> Script {
768 let nibbles: Result<Vec<u8>, std::num::ParseIntError> = hex_str
769 .chars()

Callers

nothing calls this directly

Calls 1

sha256_stackFunction · 0.85

Tested by

no test coverage detected