Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyPair ¶
type KeyPair struct { PublicKey string PrivateKey string // contains filtered or unexported fields }
KeyPair represents a public/private key pair
func NewKeyPairFromFile ¶
NewKeyPairFromFile returns a key pair from a PEM encoded private key file in the given path
func NewKeyPairFromString ¶
NewKeyPairFromString returns a key pair from a PEM encoded private key
func NewKeyPairFromv1alpha1 ¶
func NewKeyPairFromv1alpha1(keyPair *commonv1alpha1.KeyPair) (*KeyPair, error)
NewKeyPairFromv1alpha1 returns a key pair from a versioned key pair
func NewPrivateKey ¶
NewPrivateKey generates a new key pair
func (*KeyPair) Decrypt ¶
Decrypt decrypts the given base-64 contents using the private key in the key pair
func (*KeyPair) Encrypt ¶
Encrypt encrypts the given base-64 contents using the public key in the key pair
func (*KeyPair) Export ¶
func (keyPair *KeyPair) Export() *commonv1alpha1.KeyPair
Export exports the key pair to a versioned key pair
func (*KeyPair) Key ¶
func (keyPair *KeyPair) Key() *rsa.PrivateKey
Key returns the RSA private key for this private key pair
type PublicKey ¶
type PublicKey struct { PublicKey string // contains filtered or unexported fields }
PublicKey represents a public key
func NewPublicKeyFromFile ¶
NewPublicKeyFromFile returns a public key from a PEM encoded public key file in the given path
func NewPublicKeyFromString ¶
NewPublicKeyFromString returns a public key from a PEM encoded public key
type SymmetricKey ¶
type SymmetricKey string
SymmetricKey represents a symmetric key