Versions in this module Expand all Collapse all v1 v1.5.43 May 2, 2024 v1.5.42 May 2, 2024 Changes in this version + const EdDSA + const HashEdDSA + func EncryptKey(password string, privateKey PrivateKey) ([]byte, error) + func GenerateKey(random io.Reader) (PublicKey, PrivateKey, error) + func Sign(privateKey PrivateKey, message []byte) []byte + func SignWithComments(privateKey PrivateKey, message []byte, trustedComment, untrustedComment string) []byte + func Verify(publicKey PublicKey, message, signature []byte) bool + type PrivateKey struct + RawBytes [ed25519.PrivateKeySize]byte + RawID uint64 + func DecryptKey(password string, privateKey []byte) (PrivateKey, error) + func PrivateKeyFromFile(password, path string) (PrivateKey, error) + func (p PrivateKey) Bytes() []byte + func (p PrivateKey) Equal(x crypto.PrivateKey) bool + func (p PrivateKey) ID() uint64 + func (p PrivateKey) Public() crypto.PublicKey + func (p PrivateKey) Sign(_ io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) + type PublicKey struct + func PublicKeyFromFile(path string) (PublicKey, error) + func (p *PublicKey) UnmarshalText(text []byte) error + func (p PublicKey) Equal(x crypto.PublicKey) bool + func (p PublicKey) ID() uint64 + func (p PublicKey) MarshalText() ([]byte, error) + func (p PublicKey) String() string + type Reader struct + func NewReader(r io.Reader) *Reader + func (r *Reader) Read(p []byte) (int, error) + func (r *Reader) Sign(privateKey PrivateKey) []byte + func (r *Reader) SignWithComments(privateKey PrivateKey, trustedComment, untrustedComment string) []byte + func (r *Reader) Verify(publicKey PublicKey, signature []byte) bool + type Signature struct + Algorithm uint16 + CommentSignature [ed25519.SignatureSize]byte + KeyID uint64 + Signature [ed25519.SignatureSize]byte + TrustedComment string + UntrustedComment string + func SignatureFromFile(file string) (Signature, error) + func (s *Signature) UnmarshalText(text []byte) error + func (s Signature) Equal(x Signature) bool + func (s Signature) MarshalText() ([]byte, error) + func (s Signature) String() string