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

Function test_ep1

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

Source from the content-addressed store, hash-verified

1067
1068 #[test]
1069 fn test_ep1() {
1070 let x: u32 = 12;
1071 let result: u32 = rrot(x, 6) ^ rrot(x, 11) ^ rrot(x, 25);
1072 let script = script! {
1073 {u8_push_xor_table()}
1074 {u32_push(x)}
1075 {ep1(2)}
1076 {u32_toaltstack()}
1077 {u8_drop_xor_table()}
1078 {u32_fromaltstack()}
1079
1080 {u32_push(result)}
1081 {u32_equal()}
1082 };
1083 let res = execute_script(script);
1084 assert!(res.success);
1085 }
1086
1087 #[test]
1088 fn test_ep0() {

Callers

nothing calls this directly

Calls 2

execute_scriptFunction · 0.85
rrotFunction · 0.70

Tested by

no test coverage detected