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

Function test_ep0

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

Source from the content-addressed store, hash-verified

1086
1087 #[test]
1088 fn test_ep0() {
1089 let x: u32 = 12;
1090 let result: u32 = rrot(x, 2) ^ rrot(x, 13) ^ rrot(x, 22);
1091 let script = script! {
1092 {u8_push_xor_table()}
1093 {u32_push(x)}
1094 {ep0(2)}
1095 {u32_toaltstack()}
1096 {u8_drop_xor_table()}
1097 {u32_fromaltstack()}
1098
1099 {u32_push(result)}
1100 {u32_equal()}
1101 };
1102 let res = execute_script(script);
1103 assert!(res.success);
1104 }
1105
1106 #[test]
1107 fn test_sig0() {

Callers

nothing calls this directly

Calls 2

execute_scriptFunction · 0.85
rrotFunction · 0.70

Tested by

no test coverage detected