Versions in this module Expand all Collapse all v1 v1.1.0 Apr 4, 2023 v1.0.0 Mar 22, 2022 Changes in this version + const ErrPublicKeyCannotBeNilMsg + const ErrSignableCannotBeNilMsg + const ErrSignatureCannotBeNilMsg + const Hash224Size + const Hash256Size + func ErrPublicKeyCannotBeNil() error + func ErrSignableCannotBeNil() error + func ErrSignatureCannotBeNil() error + func GenerateKeyPair(algo Algo) (PrivateKey, PublicKey, error) + type Algo int + const ECDSA + const Ed25519 + const RSA + const Secp256k1 + const UNKNOWN + func (c Algo) Type() int + type Algos map[string]Algo + func GetAlgos() Algos + func (c Algos) Copy() Algos + func (c Algos) Len() int + type Hash224 [Hash224Size]byte + func NewHash224(data ...[]byte) (h224 Hash224) + func StrToHash224(str ...string) (h224 Hash224) + func (c Hash224) Base58() string + func (c Hash224) Empty() bool + func (c Hash224) Encode() string + func (c Hash224) Hamming(v224 [Hash224Size]byte) (dist int) + func (c Hash224) String() string + type Hash256 [Hash256Size]byte + func NewHash256(data ...[]byte) (h256 Hash256) + func StrToHash256(str ...string) (h256 Hash256) + func (c Hash256) Base58() string + func (c Hash256) Empty() bool + func (c Hash256) Encode() string + func (c Hash256) Hamming(v256 [Hash256Size]byte) (dist int) + func (c Hash256) String() string + type Hasher interface + Hash func() (Hash256, error) + type PrivateKey interface + Algo func() Algo + PublicKey func() PublicKey + func NewPrivateKey(ki cc.PrivKey) PrivateKey + type PublicKey interface + Algo func() Algo + Base64 func() (string, error) + Decode func(*pb.PublicKey) error + Encode func() (*pb.PublicKey, error) + Equals func(PublicKey) bool + Hash224 func() (Hash224, error) + Marshal func() ([]byte, error) + MarshalJSON func() ([]byte, error) + String func() string + Unmarshal func([]byte) error + UnmarshalJSON func([]byte) error + Verify func(Signable) (bool, error) + func DecodePublicKey(pbuf *pb.PublicKey) (PublicKey, error) + func NewPublicKey(ki crypto.PubKey) PublicKey + type Signable interface + GetSignature func() Signature + SetPublicKey func(PublicKey) + SetSignature func(Signature) + func NewSignable(blob []byte) Signable + type SignableStub struct + Blob []byte + PbKey PublicKey + Sign Signature + func (c *SignableStub) GetSignature() Signature + func (c *SignableStub) Hash() (Hash256, error) + func (c *SignableStub) SetPublicKey(pbKey PublicKey) + func (c *SignableStub) SetSignature(sign Signature) + type Signature interface + Decode func(*pb.Signature) + Encode func() *pb.Signature + Equals func(Signature) bool + Marshal func() ([]byte, error) + MarshalJSON func() ([]byte, error) + String func() string + Unmarshal func(b []byte) error + UnmarshalJSON func([]byte) error + func DecodeSignature(pbuf *pb.Signature) Signature + func NewSignature(blob []byte) Signature + type Signer interface + Sign func(Signable) (Signature, error) Other modules containing this package github.com/evenlab/go-kit