Documentation ¶
Overview ¶
Package signer creates crypto safe signature with different inputs
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidPrivateKey error when private key is invalid ErrInvalidPrivateKey = errors.New("invalid private key") // ErrInvalidPPK error when PPK is invalid ErrInvalidPPK = errors.New("invalid ppk") )
Functions ¶
This section is empty.
Types ¶
type PPK ¶ added in v0.10.5
type PPK struct { Kdf string `json:"kdf"` Salt string `json:"salt"` SecParam string `json:"secparam"` Hint string `json:"hint"` Ciphertext string `json:"ciphertext"` }
PPK struct handler for Portable Private Key file Do not change this struct to stay compatible
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer struct handler
func NewRandomSigner ¶
NewRandomSigner returns a Signer with random keys
func NewSignerFromPPK ¶ added in v0.10.5
NewSignerFromPPK returns Signer from PPK and its password
func NewSignerFromPrivateKey ¶
NewSignerFromPrivateKey returns Signer from private key
func (*Signer) GetAccount ¶
GetAccount returns Account struct holding all key values
func (*Signer) GetPrivateKey ¶
GetPrivateKey returns private key value
func (*Signer) GetPublicKey ¶
GetPublicKey returns public key value
Click to show internal directories.
Click to hide internal directories.