()
| 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() |
nothing calls this directly
no test coverage detected