ocikms

package
v0.0.0-...-52b58a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2022 License: Apache-2.0, MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright © 2019, Oracle and/or its affiliates.

Index

Constants

View Source
const (
	// OCI KMS key ID to use for encryption and decryption
	EnvOCIKMSWrapperKeyID   = "OCIKMS_WRAPPER_KEY_ID"
	EnvVaultOCIKMSSealKeyID = "VAULT_OCIKMS_SEAL_KEY_ID"
	// OCI KMS crypto endpoint to use for encryption and decryption
	EnvOCIKMSWrapperCryptoEndpoint   = "OCIKMS_WRAPPER_CRYPTO_ENDPOINT"
	EnvVaultOCIKMSSealCryptoEndpoint = "VAULT_OCIKMS_CRYPTO_ENDPOINT"
	// OCI KMS management endpoint to manage keys
	EnvOCIKMSWrapperManagementEndpoint   = "OCIKMS_WRAPPER_MANAGEMENT_ENDPOINT"
	EnvVaultOCIKMSSealManagementEndpoint = "VAULT_OCIKMS_MANAGEMENT_ENDPOINT"
	// Maximum number of retries
	KMSMaximumNumberOfRetries = 5
	// keyID config
	KMSConfigKeyID = "key_id"
	// cryptoEndpoint config
	KMSConfigCryptoEndpoint = "crypto_endpoint"
	// managementEndpoint config
	KMSConfigManagementEndpoint = "management_endpoint"
	// authTypeAPIKey config
	KMSConfigAuthTypeAPIKey = "auth_type_api_key"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

func NewWrapper

func NewWrapper(opts *wrapping.WrapperOptions) *Wrapper

NewWrapper creates a new Wrapper seal with the provided logger

func (*Wrapper) Decrypt

func (k *Wrapper) Decrypt(ctx context.Context, in *wrapping.EncryptedBlobInfo, aad []byte) ([]byte, error)

func (*Wrapper) Encrypt

func (k *Wrapper) Encrypt(ctx context.Context, plaintext, aad []byte) (*wrapping.EncryptedBlobInfo, error)

func (*Wrapper) Finalize

func (k *Wrapper) Finalize(context.Context) error

func (*Wrapper) HMACKeyID

func (k *Wrapper) HMACKeyID() string

func (*Wrapper) Init

func (k *Wrapper) Init(context.Context) error

func (*Wrapper) KeyID

func (k *Wrapper) KeyID() string

func (*Wrapper) SetConfig

func (k *Wrapper) SetConfig(config map[string]string) (map[string]string, error)

func (*Wrapper) Type

func (k *Wrapper) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL