Documentation ¶
Index ¶
- type ShamirSeal
- func (s *ShamirSeal) Decrypt(_ context.Context, in *physical.EncryptedBlobInfo) ([]byte, error)
- func (s *ShamirSeal) Encrypt(_ context.Context, plaintext []byte) (*physical.EncryptedBlobInfo, error)
- func (s *ShamirSeal) Finalize(_ context.Context) error
- func (s *ShamirSeal) GetKey() []byte
- func (s *ShamirSeal) Init(_ context.Context) error
- func (s *ShamirSeal) KeyID() string
- func (s *ShamirSeal) SealType() string
- func (s *ShamirSeal) SetKey(key []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShamirSeal ¶
type ShamirSeal struct {
// contains filtered or unexported fields
}
ShamirSeal implements the seal.Access interface for Shamir unseal
func NewSeal ¶
func NewSeal(logger log.Logger) *ShamirSeal
NewSeal creates a new ShamirSeal with the provided logger
func (*ShamirSeal) Decrypt ¶
func (s *ShamirSeal) Decrypt(_ context.Context, in *physical.EncryptedBlobInfo) ([]byte, error)
func (*ShamirSeal) Encrypt ¶
func (s *ShamirSeal) Encrypt(_ context.Context, plaintext []byte) (*physical.EncryptedBlobInfo, error)
Encrypt is used to encrypt the plaintext using the aead held by the seal.
func (*ShamirSeal) Finalize ¶
func (s *ShamirSeal) Finalize(_ context.Context) error
Finalize is called during shutdown. This is a no-op since ShamirSeal doesn't require any cleanup.
func (*ShamirSeal) GetKey ¶ added in v1.3.0
func (s *ShamirSeal) GetKey() []byte
func (*ShamirSeal) Init ¶
func (s *ShamirSeal) Init(_ context.Context) error
Init is called during core.Initialize. No-op at the moment.
func (*ShamirSeal) SealType ¶
func (s *ShamirSeal) SealType() string
SealType returns the seal type for this particular seal implementation.
func (*ShamirSeal) SetKey ¶ added in v1.3.0
func (s *ShamirSeal) SetKey(key []byte) error
Click to show internal directories.
Click to hide internal directories.