Versions in this module Expand all Collapse all v0 v0.1.0 Nov 19, 2023 Changes in this version + const PrefixKEY + const PrefixPUB + const PrefixSIG + const VersionOne + var ErrInvalidKeyFormat = errors.New("invalid private key format") + var ErrInvalidPubFormat = errors.New("invalid public key format") + var ErrInvalidSigFormat = errors.New("invalid signature format") + var ErrInvalidSignature = errors.New("invalid signature") + var ErrKeyIdMismatch = errors.New("invalid signature (key id mismatch)") + var ErrNilReader = errors.New("nil reader") + var ErrNilWriter = errors.New("nil writer") + var ErrUknownType = errors.New("unknown export type") + func Export(w io.Writer, item any) error + func NewPrivateKey() (PrivateKey, PublicKey, error) + type KeyId []byte + func (k KeyId) String() string + type PrivateKey interface + Id func() KeyId + Public func() PublicKey + Sign func(io.Reader) (Signature, error) + func ImportPrivateKey(r io.Reader) (PrivateKey, error) + type PublicKey interface + Id func() KeyId + Verify func(io.Reader, Signature) (bool, error) + func ImportPublicKey(r io.Reader) (PublicKey, error) + type Signature interface + KeyId func() KeyId + func ImportSignature(r io.Reader) (Signature, error)