Documentation ¶
Index ¶
Constants ¶
View Source
const ( PrefixSIG = "SIG:" // signature prefix PrefixPUB = "PUB:" // public key prefix PrefixKEY = "KEY:" // private key prefix )
View Source
const (
VersionOne = 1 // msign version 1
)
Variables ¶
View Source
var ( ErrInvalidPubFormat = errors.New("invalid public key format") ErrInvalidSigFormat = errors.New("invalid signature format") ErrInvalidKeyFormat = errors.New("invalid private key format") ErrInvalidSignature = errors.New("invalid signature") ErrKeyIdMismatch = errors.New("invalid signature (key id mismatch)") ErrUknownType = errors.New("unknown export type") ErrNilWriter = errors.New("nil writer") ErrNilReader = errors.New("nil reader") )
Functions ¶
func NewPrivateKey ¶
func NewPrivateKey() (PrivateKey, PublicKey, error)
Types ¶
type PrivateKey ¶
type PrivateKey interface { Id() KeyId Public() PublicKey Sign(io.Reader) (Signature, error) // contains filtered or unexported methods }
func ImportPrivateKey ¶
func ImportPrivateKey(r io.Reader) (PrivateKey, error)
Click to show internal directories.
Click to hide internal directories.