Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cypher ¶
type Cypher struct {
// contains filtered or unexported fields
}
Cypher is a structure able to encrypt and decrypt messages with an encrypted key. Before encrypting or decrypting the message, the encrypted key is decrypted with the help of the wrapped secrets.Keeper
func New ¶
New returns a Cypher wrapping a secrets.Keeper accesing the secret stored at the given url. The url depends on the secrets driver required (awskms, azurekeyvault, gcpkms, hashivault and localsecrets). See the URLOpener documentation in gocloud.dev/secrets driver subpackages for details on supported URL formats, and https://gocloud.dev/concepts/urls for more information.
func (*Cypher) Decrypt ¶
Decrypt decrypts an encrypted text using a encrypted key, returning a plain message. Before using the given key, it decrypts the key with the secrets.Keeper