ocikms

package module
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MPL-2.0 Imports: 13 Imported by: 3

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
)
View Source
const (
	// 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

func WithAuthTypeApiKey

func WithAuthTypeApiKey(with bool) wrapping.Option

WithAuthTypeApiKey provides a way to say to use api keys for auth

func WithCryptoEndpoint

func WithCryptoEndpoint(with string) wrapping.Option

WithCryptoEndpoint provides a way to chose the endpoint

func WithManagementEndpoint

func WithManagementEndpoint(with string) wrapping.Option

WithManagementEndpoint provides a way to chose the management endpoint

Types

type OptionFunc

type OptionFunc func(*options) error

OptionFunc holds a function with local options

type Wrapper

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

func NewWrapper

func NewWrapper() *Wrapper

NewWrapper creates a new Wrapper seal with the provided logger

func (*Wrapper) Decrypt

func (k *Wrapper) Decrypt(ctx context.Context, in *wrapping.BlobInfo, opt ...wrapping.Option) ([]byte, error)

func (*Wrapper) Encrypt

func (k *Wrapper) Encrypt(ctx context.Context, plaintext []byte, opt ...wrapping.Option) (*wrapping.BlobInfo, error)

func (*Wrapper) KeyId

func (k *Wrapper) KeyId(_ context.Context) (string, error)

func (*Wrapper) SetConfig

func (k *Wrapper) SetConfig(_ context.Context, opt ...wrapping.Option) (*wrapping.WrapperConfig, error)

func (*Wrapper) Type

Jump to

Keyboard shortcuts

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