Documentation ¶
Index ¶
- func AddKeyServiceFn(name string, fn func() (KeyServiceProvider, error))
- func DecodeEncrypted(data []byte) (encryptedData, error)
- type Key
- func (key *Key) Decrypt(data []byte) ([]byte, error)
- func (key *Key) DecryptEncryptedItem(encrypted encryptedData) ([]byte, error)
- func (key *Key) EncryptBytes(data []byte) ([]byte, error)
- func (key *Key) MarshalYAML() (interface{}, error)
- func (key *Key) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type KeyServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKeyServiceFn ¶
func AddKeyServiceFn(name string, fn func() (KeyServiceProvider, error))
func DecodeEncrypted ¶
Types ¶
type Key ¶
type Key struct { ID uuid.UUID Alias string Ciphertext []byte Plaintext []byte Type string Context map[string]string }
func GenerateDatakey ¶
func (*Key) DecryptEncryptedItem ¶
func (*Key) MarshalYAML ¶
func (*Key) UnmarshalYAML ¶
type KeyServiceProvider ¶
type KeyServiceProvider interface { GenerateDatakey(master string, context map[string]string) ([]byte, error) DecryptDatakey(ciphertext *[]byte, plaintext *[]byte, context map[string]string) error }
func GetKeyService ¶
func GetKeyService(name string) (KeyServiceProvider, error)
Click to show internal directories.
Click to hide internal directories.