mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-25 03:56:34 +00:00
9015e50847
Rename it to Neo.Crypto.CheckMultisig and remove `message` parameter.
22 lines
819 B
Go
22 lines
819 B
Go
/*
|
|
Package crypto provides an interface to cryptographic syscalls.
|
|
*/
|
|
package crypto
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/interop"
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/neogointernal"
|
|
)
|
|
|
|
// CheckMultisig checks that script container (transaction) is signed by multiple
|
|
// ECDSA keys at once. It uses `Neo.Crypto.CheckMultisig` syscall.
|
|
func CheckMultisig(pubs []interop.PublicKey, sigs []interop.Signature) bool {
|
|
return neogointernal.Syscall2("Neo.Crypto.CheckMultisig", pubs, sigs).(bool)
|
|
}
|
|
|
|
// CheckSig checks that sig is correct signature of the script container
|
|
// (transaction) for a given pub (serialized public key). It uses
|
|
// `Neo.Crypto.CheckSig` syscall.
|
|
func CheckSig(pub interop.PublicKey, sig interop.Signature) bool {
|
|
return neogointernal.Syscall2("Neo.Crypto.CheckSig", pub, sig).(bool)
|
|
}
|