Documentation ¶
Overview ¶
Package signer creates crypto safe signature with different inputs
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 a Signer from private key. The private key must be associated with the `clientPublicKey` used during AAT generation. This is sometimes referred to as the `gateway` key as well. It may or may not be the same as the `applicationPublicKey` depending on how the AAT was generated.
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