Documentation ¶
Index ¶
- Constants
- type Wrapper
- func (k *Wrapper) Decrypt(_ context.Context, in *wrapping.EncryptedBlobInfo, aad []byte) (pt []byte, err error)
- func (k *Wrapper) Encrypt(_ context.Context, plaintext, aad []byte) (blob *wrapping.EncryptedBlobInfo, err error)
- func (k *Wrapper) Finalize(_ context.Context) error
- func (k *Wrapper) HMACKeyID() string
- func (k *Wrapper) Init(_ context.Context) error
- func (k *Wrapper) KeyID() string
- func (k *Wrapper) SetConfig(config map[string]string) (map[string]string, error)
- func (k *Wrapper) Type() string
Constants ¶
View Source
const ( PROVIDER_SECRET_ID = "TENCENTCLOUD_SECRET_ID" PROVIDER_SECRET_KEY = "TENCENTCLOUD_SECRET_KEY" PROVIDER_SECURITY_TOKEN = "TENCENTCLOUD_SECURITY_TOKEN" PROVIDER_REGION = "TENCENTCLOUD_REGION" PROVIDER_KMS_KEY_ID = "TENCENTCLOUD_KMS_KEY_ID" )
These constants are TencentCloud accepted env vars
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper is a wrapper that uses TencentCloud KMS
func NewWrapper ¶
func NewWrapper(opts *wrapping.WrapperOptions) *Wrapper
NewWrapper returns a new TencentCloud wrapper
func (*Wrapper) Decrypt ¶
func (k *Wrapper) Decrypt(_ context.Context, in *wrapping.EncryptedBlobInfo, aad []byte) (pt []byte, err error)
Decrypt is used to decrypt the ciphertext using the the TencentCloud KMS. This should be called after the KMS client has been instantiated.
func (*Wrapper) Encrypt ¶
func (k *Wrapper) Encrypt(_ context.Context, plaintext, aad []byte) (blob *wrapping.EncryptedBlobInfo, err error)
Encrypt is used to encrypt the master key using the the TencentCloud KMS. This returns the ciphertext, and/or any errors from this call. This should be called after the KMS client has been instantiated.
Click to show internal directories.
Click to hide internal directories.