Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
Access is the embedded implementation of autoSeal that contains logic specific to encrypting and decrypting data, or in this case keys.
func NewTestSeal ¶
func NewTestSeal(opts *TestSealOpts) *Access
func NewToggleableTestSeal ¶
func NewToggleableTestSeal(opts *TestSealOpts) (*Access, *error)
func (*Access) Decrypt ¶
func (a *Access) Decrypt(ctx context.Context, data *wrapping.EncryptedBlobInfo, aad []byte) (pt []byte, err error)
Decrypt uses the underlying seal to decrypt the cryptotext and returns it. Note that it is possible depending on the wrapper used that both pt and err are populated.
type Envelope ¶
type Envelope struct {
// contains filtered or unexported fields
}
func NewEnvelope ¶
func NewEnvelope() *Envelope
type StoredKeysSupport ¶
type StoredKeysSupport int
const ( // The 0 value of StoredKeysSupport is an invalid option StoredKeysInvalid StoredKeysSupport = iota StoredKeysNotSupported StoredKeysSupportedGeneric StoredKeysSupportedShamirMaster )
func (StoredKeysSupport) String ¶
func (s StoredKeysSupport) String() string
type TestSealOpts ¶
type TestSealOpts struct { Logger hclog.Logger StoredKeys StoredKeysSupport Secret []byte Name string }
type ToggleableWrapper ¶
func (ToggleableWrapper) Decrypt ¶
func (t ToggleableWrapper) Decrypt(ctx context.Context, info *wrapping.EncryptedBlobInfo, bytes []byte) ([]byte, error)
func (ToggleableWrapper) Encrypt ¶
func (t ToggleableWrapper) Encrypt(ctx context.Context, bytes []byte, bytes2 []byte) (*wrapping.EncryptedBlobInfo, error)
Click to show internal directories.
Click to hide internal directories.