Documentation ¶
Index ¶
- func CryptoToRuntimeHashingAlgorithm(h hash.HashingAlgorithm) runtime.HashAlgorithm
- func CryptoToRuntimeSigningAlgorithm(s crypto.SigningAlgorithm) runtime.SignatureAlgorithm
- func NewAccountPublicKey(publicKey *runtime.PublicKey, hashAlgo sema.HashAlgorithm, keyIndex int, ...) (*flow.AccountPublicKey, error)
- func NewHasher(hashAlgo hash.HashingAlgorithm) hash.Hasher
- func RuntimeToCryptoHashingAlgorithm(s runtime.HashAlgorithm) hash.HashingAlgorithm
- func RuntimeToCryptoSigningAlgorithm(s runtime.SignatureAlgorithm) crypto.SigningAlgorithm
- func VerifySignatureFromRuntime(verifier SignatureVerifier, signature []byte, rawTag string, message []byte, ...) (bool, error)
- type DefaultSignatureVerifier
- type SignatureVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CryptoToRuntimeHashingAlgorithm ¶
func CryptoToRuntimeHashingAlgorithm(h hash.HashingAlgorithm) runtime.HashAlgorithm
CryptoToRuntimeHashingAlgorithm converts a crypto hashing algorithm to a runtime hash algorithm.
func CryptoToRuntimeSigningAlgorithm ¶
func CryptoToRuntimeSigningAlgorithm(s crypto.SigningAlgorithm) runtime.SignatureAlgorithm
CryptoToRuntimeSigningAlgorithm converts a crypto signature algorithm to a runtime signature algorithm.
func NewAccountPublicKey ¶
func NewAccountPublicKey(publicKey *runtime.PublicKey, hashAlgo sema.HashAlgorithm, keyIndex int, weight int, ) (*flow.AccountPublicKey, error)
NewAccountPublicKey construct an account public key given a runtime public key.
func NewHasher ¶
func NewHasher(hashAlgo hash.HashingAlgorithm) hash.Hasher
NewHasher returns a crypto hasher supported by runtime.
func RuntimeToCryptoHashingAlgorithm ¶
func RuntimeToCryptoHashingAlgorithm(s runtime.HashAlgorithm) hash.HashingAlgorithm
RuntimeToCryptoHashingAlgorithm converts a runtime hash algorithm to a crypto hashing algorithm.
func RuntimeToCryptoSigningAlgorithm ¶
func RuntimeToCryptoSigningAlgorithm(s runtime.SignatureAlgorithm) crypto.SigningAlgorithm
RuntimeToCryptoSigningAlgorithm converts a runtime signature algorithm to a crypto signature algorithm.
func VerifySignatureFromRuntime ¶
func VerifySignatureFromRuntime( verifier SignatureVerifier, signature []byte, rawTag string, message []byte, rawPublicKey []byte, signatureAlgorithm runtime.SignatureAlgorithm, hashAlgorithm runtime.HashAlgorithm, ) (bool, error)
VerifySignatureFromRuntime is an adapter that performs signature verification using raw values provided by the Cadence runtime.
Types ¶
type DefaultSignatureVerifier ¶
type DefaultSignatureVerifier struct{}
func NewDefaultSignatureVerifier ¶
func NewDefaultSignatureVerifier() DefaultSignatureVerifier