Documentation
¶
Index ¶
- func DecryptFromStdin(privateKeys []string, paasName string) error
- func EncryptFile(publicKey string, paasName string, path string) error
- func EncryptFromStdin(publicKey string, paasName string) error
- func GenerateKeyPair(privateKey string, publicKey string) error
- type Crypt
- func NewCryptFromFiles(privateKeyPaths []string, publicKeyPath string, encryptionContext string) (*Crypt, error)
- func NewCryptFromKeys(privateKeys CryptPrivateKeys, publicKeyPath string, encryptionContext string) (*Crypt, error)
- func NewGeneratedCrypt(privateKeyPath string, publicKeyPath string) (*Crypt, error)
- type CryptPrivateKey
- type CryptPrivateKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptFromStdin ¶
func EncryptFromStdin ¶
func GenerateKeyPair ¶
Types ¶
type Crypt ¶
type Crypt struct {
// contains filtered or unexported fields
}
func NewCryptFromFiles ¶ added in v1.3.0
func NewCryptFromFiles(privateKeyPaths []string, publicKeyPath string, encryptionContext string) (*Crypt, error)
NewCryptFromFiles returns a Crypt based on the provided privateKeyPaths and publicKeyPath using the encryptionContext
func NewCryptFromKeys ¶ added in v1.3.0
func NewCryptFromKeys(privateKeys CryptPrivateKeys, publicKeyPath string, encryptionContext string) (*Crypt, error)
NewCryptFromKeys returns a Crypt based on the provided privateKeys and publicKey using the encryptionContext
func NewGeneratedCrypt ¶ added in v0.6.1
func (*Crypt) DecryptRsa ¶
type CryptPrivateKey ¶ added in v1.3.0
type CryptPrivateKey struct {
// contains filtered or unexported fields
}
A CryptPrivateKey is used for decryption of encrypted secrets
func NewPrivateKeyFromFile ¶ added in v1.3.0
func NewPrivateKeyFromFile(privateKeyPath string) (*CryptPrivateKey, error)
NewPrivateKeyFromFile returns a CryptPrivateKey from a privateKeyFilePath
func NewPrivateKeyFromPem ¶ added in v1.3.0
func NewPrivateKeyFromPem(privateKeyPath string, privateKeyPem []byte) (*CryptPrivateKey, error)
NewPrivateKeyFromPem returns a CryptPrivateKey from a privateKeyFilePath
func (*CryptPrivateKey) DecryptRsa ¶ added in v1.3.0
func (pk *CryptPrivateKey) DecryptRsa(data []byte, encryptionContext []byte) (decryptedBytes []byte, err error)
type CryptPrivateKeys ¶ added in v1.3.0
type CryptPrivateKeys []*CryptPrivateKey
We can use multiple private keys (for rotation) and store them in a list of PrivateKey's
func NewPrivateKeysFromFiles ¶ added in v1.3.0
func NewPrivateKeysFromFiles(privateKeyPaths []string) (CryptPrivateKeys, error)
NewPrivateKeysFromFiles returns a Crypt based on the provided privateKeyPaths
func NewPrivateKeysFromSecretData ¶ added in v1.3.0
func NewPrivateKeysFromSecretData(privateKeyData map[string][]byte) (CryptPrivateKeys, error)
NewPrivateKeysFromSecretData returns a Crypt based on the provided privateKeyPaths
func (CryptPrivateKeys) AsSecretData ¶ added in v1.3.0
func (pks CryptPrivateKeys) AsSecretData() (data map[string][]byte)
func (CryptPrivateKeys) Compare ¶ added in v1.3.0
func (pks CryptPrivateKeys) Compare(other CryptPrivateKeys) (same bool)
Compare checks 2 sets of private keys