Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidKey = fmt.Errorf("invalid encryption key")
ErrInvalidKey encryption key is not valid.
var ErrKeyAlreadyUsed = fmt.Errorf("encryption key already used")
ErrKeyAlreadyUsed encryption key has already been set for subjectID.
var ErrKeyExistsForSubjectID = fmt.Errorf("key already exists for subjectID")
ErrKeyExistsForSubjectID encryption key has already been set for subjectID.
var ErrKeyNotFound = fmt.Errorf("key not found")
ErrKeyNotFound encryption key was not found error.
var ErrKeyWasDeleted = fmt.Errorf("removed from GDPR request")
ErrKeyWasDeleted encryption key was removed error.
Functions ¶
func NewAESEncryption ¶
func NewAESEncryption(options ...Option) *aesEncryption
NewAESEncryption constructs an AES/CBC/PKCS5Padding encryption engine.
func NewEventEncryptor ¶
Types ¶
type Encryptor ¶
type Encryptor interface {
Encrypt(key, data string) (string, error)
Decrypt(key, cipherText string) (string, error)
}
Encryptor defines how to encrypt/decrypt string data using base64.
type EventEncryptor ¶
type EventEncryptor interface {
Encrypt(event rangedb.Event) error
Decrypt(event rangedb.Event) error
}
EventEncryptor defines how to encrypt/decrypt a rangedb.Event
type KeyStore ¶
type KeyStore interface {
Get(subjectID string) (string, error)
Set(subjectID, key string) error
Delete(subjectID string) error
}
KeyStore defines how encryption keys are stored. Verified by cryptotest.VerifyKeyStore.
type Option ¶ added in v0.7.1
type Option func(*aesEncryption)
Option defines functional option parameters for aesEncryption.
func WithRandReader ¶ added in v0.7.1
func WithRandReader(randReader RandReader) Option
WithRandReader is a functional option to inject a random reader.
type RandReader ¶ added in v0.7.1
Directories
¶
| Path | Synopsis |
|---|---|
|
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
provider
|
|