mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-12 21:10:36 +00:00
bd37359393
Add VerifySignature interop for signature verification. It is converted to VERIFY opcode.
29 lines
648 B
Go
29 lines
648 B
Go
package crypto
|
|
|
|
// Package crypto provides function signatures that can be used inside
|
|
// smart contracts that are written in the neo-go framework.
|
|
|
|
// SHA1 computes the sha1 hash of b.
|
|
func SHA1(b []byte) []byte {
|
|
return nil
|
|
}
|
|
|
|
// SHA256 computes the sha256 hash of b.
|
|
func SHA256(b []byte) []byte {
|
|
return nil
|
|
}
|
|
|
|
// Hash160 computes the sha256 + ripemd160 of b.
|
|
func Hash160(b []byte) []byte {
|
|
return nil
|
|
}
|
|
|
|
// Hash256 computes the sha256^2 hash of b.
|
|
func Hash256(b []byte) []byte {
|
|
return nil
|
|
}
|
|
|
|
// VerifySignature checks that sig is msg's signature with pub.
|
|
func VerifySignature(msg []byte, sig []byte, pub []byte) bool {
|
|
return false
|
|
}
|