Documentation ¶
Index ¶
- Constants
- type AliCloudKMSSeal
- func (k *AliCloudKMSSeal) Decrypt(_ context.Context, in *physical.EncryptedBlobInfo) ([]byte, error)
- func (k *AliCloudKMSSeal) Encrypt(_ context.Context, plaintext []byte) (*physical.EncryptedBlobInfo, error)
- func (k *AliCloudKMSSeal) Finalize(_ context.Context) error
- func (k *AliCloudKMSSeal) Init(_ context.Context) error
- func (k *AliCloudKMSSeal) KeyID() string
- func (k *AliCloudKMSSeal) SealType() string
- func (k *AliCloudKMSSeal) SetConfig(config map[string]string) (map[string]string, error)
Constants ¶
View Source
const (
EnvAliCloudKMSSealKeyID = "VAULT_ALICLOUDKMS_SEAL_KEY_ID"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliCloudKMSSeal ¶
type AliCloudKMSSeal struct {
// contains filtered or unexported fields
}
func NewSeal ¶
func NewSeal(logger log.Logger) *AliCloudKMSSeal
func (*AliCloudKMSSeal) Decrypt ¶
func (k *AliCloudKMSSeal) Decrypt(_ context.Context, in *physical.EncryptedBlobInfo) ([]byte, error)
Decrypt is used to decrypt the ciphertext. This should be called after Init.
func (*AliCloudKMSSeal) Encrypt ¶
func (k *AliCloudKMSSeal) Encrypt(_ context.Context, plaintext []byte) (*physical.EncryptedBlobInfo, error)
Encrypt is used to encrypt the master key using the the AliCloud CMK. This returns the ciphertext, and/or any errors from this call. This should be called after the KMS client has been instantiated.
func (*AliCloudKMSSeal) Finalize ¶
func (k *AliCloudKMSSeal) Finalize(_ context.Context) error
Finalize is called during shutdown. This is a no-op since AliCloudKMSSeal doesn't require any cleanup.
func (*AliCloudKMSSeal) Init ¶
func (k *AliCloudKMSSeal) Init(_ context.Context) error
Init is called during core.Initialize. No-op at the moment.
func (*AliCloudKMSSeal) KeyID ¶
func (k *AliCloudKMSSeal) KeyID() string
KeyID returns the last known key id.
func (*AliCloudKMSSeal) SealType ¶
func (k *AliCloudKMSSeal) SealType() string
SealType returns the seal type for this particular seal implementation.
Click to show internal directories.
Click to hide internal directories.