Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EncryptionProviderNotRegisteredError = fmt.Errorf("crypto/providers: encryption provider not registered")
Functions ¶
This section is empty.
Types ¶
type EncryptionProvider ¶
type EncryptionProvider interface { Encrypt(ctx context.Context, conf *v2.EncryptionConfig, plainText *v2.PlaintextData) (*v2.EncryptedData, error) Decrypt(ctx context.Context, cipherText *v2.EncryptedData, privateKey []byte) (*v2.PlaintextData, error) GenerateKey(ctx context.Context) (*v2.EncryptionConfig, []byte, error) }
func GetEncryptionProvider ¶
func GetEncryptionProvider(name string) (EncryptionProvider, error)
func GetEncryptionProviderForConfig ¶
func GetEncryptionProviderForConfig(ctx context.Context, conf *v2.EncryptionConfig) (EncryptionProvider, error)
GetEncryptionProviderForConfig returns the encryption provider for the given config. If the config specifies a provider, we will fetch it directly by name and return an error if it's not found. If the config contains a non-nil well-known configuration (like JWKPublicKeyConfig), we will return the provider for that by name. If we can't find a provider, we return an EncryptionProviderNotRegisteredError.
Click to show internal directories.
Click to hide internal directories.