Documentation ¶
Index ¶
- type ShamirWrapper
- type Wrapper
- func (s *Wrapper) Decrypt(_ context.Context, in *wrapping.EncryptedBlobInfo, aad []byte) ([]byte, error)
- func (s *Wrapper) Encrypt(_ context.Context, plaintext, aad []byte) (*wrapping.EncryptedBlobInfo, error)
- func (s *Wrapper) Finalize(_ context.Context) error
- func (s *Wrapper) GetKeyBytes() []byte
- func (s *Wrapper) HMACKeyID() string
- func (s *Wrapper) Init(_ context.Context) error
- func (s *Wrapper) KeyID() string
- func (s *Wrapper) SetAEAD(aead cipher.AEAD)
- func (s *Wrapper) SetAESGCMKeyBytes(key []byte) error
- func (s *Wrapper) SetConfig(config map[string]string) (map[string]string, error)
- func (s *Wrapper) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShamirWrapper ¶ added in v0.5.2
type ShamirWrapper struct {
*Wrapper
}
ShamirWrapper is here for backwards compatibility for Vault; it reports a type of "shamir" instead of "aead"
func NewShamirWrapper ¶ added in v0.5.2
func NewShamirWrapper(opts *wrapping.WrapperOptions) *ShamirWrapper
func (*ShamirWrapper) Type ¶ added in v0.5.2
func (s *ShamirWrapper) Type() string
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper implements the wrapping.Wrapper interface for AEAD
func NewWrapper ¶
func NewWrapper(opts *wrapping.WrapperOptions) *Wrapper
NewWrapper creates a new Wrapper with the provided logger
func (*Wrapper) Encrypt ¶
func (s *Wrapper) Encrypt(_ context.Context, plaintext, aad []byte) (*wrapping.EncryptedBlobInfo, error)
Encrypt is used to encrypt the plaintext using the aead held by the seal.
func (*Wrapper) Finalize ¶
Finalize is called during shutdown. This is a no-op since Wrapper doesn't require any cleanup.
func (*Wrapper) GetKeyBytes ¶
func (*Wrapper) SetAESGCMKeyBytes ¶
SetAESGCMKeyBytes takes in a byte slice and constucts an AES-GCM AEAD from it
Click to show internal directories.
Click to hide internal directories.