transit

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package transit contains all the functionality necessary for interacting with Vault's transit secrets engine.

See https://www.vaultproject.io/docs/secrets/transit for more information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	API          api.API
	TokenManager auth.TokenManager
}

Client is a gateway into the functionality provided by Vault's transit secret engine.

func (*Client) Decrypt

func (t *Client) Decrypt(ctx context.Context, key string, ciphertext string) ([]byte, error)

Decrypt decrypts a Vault ciphertext.

func (*Client) DecryptBatch

func (t *Client) DecryptBatch(ctx context.Context, key string, ciphertexts ...string) ([][]byte, error)

DecryptBatch decrypts multiple data items into Vault ciphertexts.

func (*Client) Encrypt

func (t *Client) Encrypt(ctx context.Context, key string, data []byte) (string, error)

Encrypt encrypts data into a Vault ciphertext.

func (*Client) EncryptBatch

func (t *Client) EncryptBatch(ctx context.Context, key string, data ...[]byte) ([]string, error)

EncryptBatch encrypts multiple data items into Vault ciphertexts.

Jump to

Keyboard shortcuts

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