Versions in this module Expand all Collapse all v0 v0.22.0 Aug 26, 2021 Changes in this version + const ECDSA_P256 + const ECDSA_secp256k1 + const MinSeedLength + const SHA2_256 + const SHA2_384 + const SHA3_256 + const SHA3_384 + const UnknownHashAlgorithm + const UnknownSignatureAlgorithm + var DecodePrivateKey = crypto.DecodePrivateKey + var DecodePublicKey = crypto.DecodePublicKey + func CompatibleAlgorithms(sigAlgo SignatureAlgorithm, hashAlgo HashAlgorithm) bool + type Hash = hash.Hash + type HashAlgorithm = hash.HashingAlgorithm + func StringToHashAlgorithm(s string) HashAlgorithm + type Hasher = hash.Hasher + func NewHasher(algo HashAlgorithm) (Hasher, error) + func NewSHA2_256() Hasher + func NewSHA2_384() Hasher + func NewSHA3_256() Hasher + func NewSHA3_384() Hasher + type InMemorySigner struct + Hasher Hasher + PrivateKey PrivateKey + func NewInMemorySigner(privateKey PrivateKey, hashAlgo HashAlgorithm) InMemorySigner + func (s InMemorySigner) Sign(message []byte) ([]byte, error) + type NaiveSigner = InMemorySigner + func NewNaiveSigner(privateKey PrivateKey, hashAlgo HashAlgorithm) NaiveSigner + type PrivateKey = crypto.PrivateKey + func DecodePrivateKeyHex(sigAlgo SignatureAlgorithm, s string) (PrivateKey, error) + func GeneratePrivateKey(sigAlgo SignatureAlgorithm, seed []byte) (PrivateKey, error) + type PublicKey = crypto.PublicKey + func DecodePublicKeyHex(sigAlgo SignatureAlgorithm, s string) (PublicKey, error) + func DecodePublicKeyPEM(sigAlgo SignatureAlgorithm, s string) (PublicKey, error) + type SignatureAlgorithm = crypto.SigningAlgorithm + func StringToSignatureAlgorithm(s string) SignatureAlgorithm + type Signer interface + Sign func(message []byte) ([]byte, error)