transit

package
v1.13.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MPL-2.0 Imports: 37 Imported by: 112

Documentation

Index

Constants

View Source
const EncryptedKeyBytes = 512
View Source
const WrappingKeyName = "wrapping-key"

Variables

View Source
var ErrInvalidKeyName = errors.New("key names cannot be paths")
View Source
var ErrNonceNotAllowed = errors.New("provided nonce not allowed for this key")

Functions

func Backend

func Backend(ctx context.Context, conf *logical.BackendConfig) (*backend, error)

func Factory

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

func GetCacheSizeFromStorage added in v1.2.0

func GetCacheSizeFromStorage(ctx context.Context, s logical.Storage) (int, error)

func GetManagedKeyUUID added in v1.13.0

func GetManagedKeyUUID(ctx context.Context, b *backend, keyName string, keyId string) (uuid string, err error)

Types

type AssocDataFactory added in v1.13.0

type AssocDataFactory struct {
	Encoded string
}

func (AssocDataFactory) GetAssociatedData added in v1.13.0

func (a AssocDataFactory) GetAssociatedData() ([]byte, error)

type BatchRequestItem added in v0.6.5

type BatchRequestItem struct {
	// Context for key derivation. This is required for derived keys.
	Context string `json:"context" structs:"context" mapstructure:"context"`

	// DecodedContext is the base64 decoded version of Context
	DecodedContext []byte

	// Plaintext for encryption
	Plaintext string `json:"plaintext" structs:"plaintext" mapstructure:"plaintext"`

	// Ciphertext for decryption
	Ciphertext string `json:"ciphertext" structs:"ciphertext" mapstructure:"ciphertext"`

	// Nonce to be used when v1 convergent encryption is used
	Nonce string `json:"nonce" structs:"nonce" mapstructure:"nonce"`

	// The key version to be used for encryption
	KeyVersion int `json:"key_version" structs:"key_version" mapstructure:"key_version"`

	// DecodedNonce is the base64 decoded version of Nonce
	DecodedNonce []byte

	// Associated Data for AEAD ciphers
	AssociatedData string `json:"associated_data" struct:"associated_data" mapstructure:"associated_data"`

	// Reference is an arbitrary caller supplied string value that will be placed on the
	// batch response to ease correlation between inputs and outputs
	Reference string `json:"reference" structs:"reference" mapstructure:"reference"`
}

BatchRequestItem represents a request item for batch processing

type DecryptBatchResponseItem added in v1.6.0

type DecryptBatchResponseItem struct {
	// Plaintext for the ciphertext present in the corresponding batch
	// request item
	Plaintext string `json:"plaintext" structs:"plaintext" mapstructure:"plaintext"`

	// Error, if set represents a failure encountered while encrypting a
	// corresponding batch request item
	Error string `json:"error,omitempty" structs:"error" mapstructure:"error"`

	// Reference is an arbitrary caller supplied string value that will be placed on the
	// batch response to ease correlation between inputs and outputs
	Reference string `json:"reference" structs:"reference" mapstructure:"reference"`
}

type EncryptBatchResponseItem added in v1.6.0

type EncryptBatchResponseItem struct {
	// Ciphertext for the plaintext present in the corresponding batch
	// request item
	Ciphertext string `json:"ciphertext,omitempty" structs:"ciphertext" mapstructure:"ciphertext"`

	// KeyVersion defines the key version used to encrypt plaintext.
	KeyVersion int `json:"key_version,omitempty" structs:"key_version" mapstructure:"key_version"`

	// Error, if set represents a failure encountered while encrypting a
	// corresponding batch request item
	Error string `json:"error,omitempty" structs:"error" mapstructure:"error"`

	// Reference is an arbitrary caller supplied string value that will be placed on the
	// batch response to ease correlation between inputs and outputs
	Reference string `json:"reference"`
}

EncryptBatchResponseItem represents a response item for batch processing

type ManagedKeyFactory added in v1.13.0

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

func (ManagedKeyFactory) GetManagedKeyParameters added in v1.13.0

func (m ManagedKeyFactory) GetManagedKeyParameters() keysutil.ManagedKeyParameters

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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