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

Function test_sig1

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

Source from the content-addressed store, hash-verified

1124
1125 #[test]
1126 fn test_sig1() {
1127 let x: u32 = 12;
1128 let result: u32 = rrot(x, 17) ^ rrot(x, 19) ^ (x >> 10);
1129 let script = script! {
1130 {u8_push_xor_table()}
1131 {u32_push(x)}
1132 {sig1(2)}
1133 {u32_toaltstack()}
1134 {u8_drop_xor_table()}
1135 {u32_fromaltstack()}
1136
1137 {u32_push(result)}
1138 {u32_equal()}
1139 };
1140 let res = execute_script(script);
1141 assert!(res.success);
1142 }
1143
1144 #[test]
1145 fn test_transform_data() {

Callers

nothing calls this directly

Calls 2

execute_scriptFunction · 0.85
rrotFunction · 0.70

Tested by

no test coverage detected