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

Function test_sig0

bitvm/src/hash/sha256.rs:1107–1123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1105
1106 #[test]
1107 fn test_sig0() {
1108 let x: u32 = 12;
1109 let result: u32 = rrot(x, 7) ^ rrot(x, 18) ^ (x >> 3);
1110 let script = script! {
1111 {u8_push_xor_table()}
1112 {u32_push(x)}
1113 {sig0(2)}
1114 {u32_toaltstack()}
1115 {u8_drop_xor_table()}
1116 {u32_fromaltstack()}
1117
1118 {u32_push(result)}
1119 {u32_equal()}
1120 };
1121 let res = execute_script(script);
1122 assert!(res.success);
1123 }
1124
1125 #[test]
1126 fn test_sig1() {

Callers

nothing calls this directly

Calls 2

execute_scriptFunction · 0.85
rrotFunction · 0.70

Tested by

no test coverage detected