TransitClient

final class TransitClient[F[_]](client: Client[F], vaultUri: Uri, token: String, key: KeyName)(F: Sync[F])

A TransitClient represents an authenticated connection to a vault transit service. The way we see to use it is that, in your application you may have a certain type of data that you want to encrypt or decrypt using Vault transit, with a key that is fixed for that data.

A TransitClient represents an authenticated connection to a vault transit service. The way we see to use it is that, in your application you may have a certain type of data that you want to encrypt or decrypt using Vault transit, with a key that is fixed for that data.

class Object
trait Matchable
class Any

Value members

Concrete methods

def decrypt(cipherText: CipherText): F[PlainText]

https://www.vaultproject.io/api/secret/transit/index.html#decrypt-data

def decryptBatch(inputs: NonEmptyList[CipherText]): F[NonEmptyList[Or[PlainText]]]

Decrypts a batch of input ciphertexts using a single round-trip to the Vault server. Returns a list where each entry is the attempted result of decrypting the ciphertext at the same position. That result may be either a Transit error or the plaintext, if it failed or succeeded for that ciphertext.

Decrypts a batch of input ciphertexts using a single round-trip to the Vault server. Returns a list where each entry is the attempted result of decrypting the ciphertext at the same position. That result may be either a Transit error or the plaintext, if it failed or succeeded for that ciphertext.

https://www.vaultproject.io/api/secret/transit/index.html#batch_input-2

def decryptInContext(cipherText: CipherText, context: Context): F[PlainText]

https://www.vaultproject.io/api/secret/transit/index.html#decrypt-data

def decryptInContextBatch(inputs: NonEmptyList[(CipherText, Context)]): F[NonEmptyList[Or[PlainText]]]

Decrypts a batch of input pairs (ciphertexts and contexts) using a single round-trip to the Vault server. Returns a list where each entry is the attempted result of decrypting the input at the same position. That result may be either a Transit error or the plaintext.

Decrypts a batch of input pairs (ciphertexts and contexts) using a single round-trip to the Vault server. Returns a list where each entry is the attempted result of decrypting the input at the same position. That result may be either a Transit error or the plaintext.

https://www.vaultproject.io/api/secret/transit/index.html#batch_input-2

def encrypt(plaintext: PlainText): F[CipherText]

Function to encrypt data, given the name of the secret

Function to encrypt data, given the name of the secret

https://www.vaultproject.io/api/secret/transit/index.html#encrypt-data

def encryptBatch(plaintexts: NonEmptyList[PlainText]): F[NonEmptyList[Or[CipherText]]]

Function to encrypt a batch of data, without any context.

Function to encrypt a batch of data, without any context.

When encrypting a batch of data, transit may work ok for some inputs, but fail for others. That is why the result is a list where each element is either a failed message or a CipherText

https://www.vaultproject.io/api/secret/transit/index.html#batch_input

def encryptInContext(plaintext: PlainText, context: Context): F[CipherText]

Function to encrypt data, adding a context for key derivation.

Function to encrypt data, adding a context for key derivation.

https://www.vaultproject.io/api/secret/transit/index.html#encrypt-data

def encryptInContextBatch(inputs: NonEmptyList[(PlainText, Context)]): F[NonEmptyList[Or[CipherText]]]

Function to encrypt a batch of context-plaintext pairs in a single trip.

Function to encrypt a batch of context-plaintext pairs in a single trip.

https://www.vaultproject.io/api/secret/transit/index.html#batch_input

Concrete fields

Function to access the details of a transit Key

Function to access the details of a transit Key

https://www.vaultproject.io/api/secret/transit/index.html#read-key