opcodeSha1 treats the top item of the data stack as raw bytes and replaces it with sha1(data). Stack transformation: [... x1] -> [... sha1(x1)]
(op *opcode, data []byte, vm *Engine)
| 1889 | // |
| 1890 | // Stack transformation: [... x1] -> [... sha1(x1)] |
| 1891 | func opcodeSha1(op *opcode, data []byte, vm *Engine) error { |
| 1892 | buf, err := vm.dstack.PopByteArray() |
| 1893 | if err != nil { |
| 1894 | return err |
| 1895 | } |
| 1896 | |
| 1897 | hash := sha1.Sum(buf) |
| 1898 | vm.dstack.PushByteArray(hash[:]) |
| 1899 | return nil |
| 1900 | } |
| 1901 | |
| 1902 | // opcodeSha256 treats the top item of the data stack as raw bytes and replaces |
| 1903 | // it with sha256(data). |
nothing calls this directly
no test coverage detected
searching dependent graphs…