Versions in this module Expand all Collapse all v0 v0.1.0 Mar 17, 2023 Changes in this version + const PEMType + var ErrInvalidMagicPreamble = errors.New("invalid magic preamble") + var ErrMissingNamespace = errors.New("missing namespace") + var ErrNamespaceMismatch = errors.New("namespace does not match") + var ErrPublicKeyMismatch = errors.New("public key does not match") + var ErrUnavailableHashAlgorithm = errors.New("unavailable hash algorithm") + var ErrUnsupportedHashAlgorithm = errors.New("unsupported hash algorithm") + var ErrUnsupportedSignatureVersion = errors.New("unsupported signature version") + func Armor(s *Signature) []byte + func Verify(m io.Reader, sig *Signature, pub ssh.PublicKey, h HashAlgorithm, ...) error + type HashAlgorithm string + const HashSHA256 + const HashSHA512 + func SupportedHashAlgorithms() []HashAlgorithm + func (h HashAlgorithm) Available() error + func (h HashAlgorithm) Hash() hash.Hash + func (h HashAlgorithm) String() string + func (h HashAlgorithm) Supported() error + type Signature struct + HashAlgorithm HashAlgorithm + Namespace string + PublicKey ssh.PublicKey + Signature *ssh.Signature + Version uint32 + func ParseSignature(b []byte) (*Signature, error) + func Sign(m io.Reader, signer ssh.Signer, h HashAlgorithm, namespace string) (*Signature, error) + func SignWithRand(m, rand io.Reader, signer ssh.Signer, h HashAlgorithm, namespace string) (*Signature, error) + func Unarmor(b []byte) (*Signature, error) + func (s Signature) Marshal() []byte