Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here


Provices a encrypted store of variables to prevent accidential leakage Please read the documentation

Nested types and modules


The key used to decrypt/encrypt variables


Need to be public because of Newtonsoft.Json, don't use


The vault which stores the encryptes values

Functions and values

Function or valueDescription
Signature: (key:byte [] * salt:byte [] * inputStream:Stream * outputStream:Stream) -> unit
Signature: (key:byte [] * iv:byte [] * inputBytes:byte []) -> byte []
Signature: file:string option -> KeyInfo

Create a new key with the given path to the secret file (or Path.GetTempFileName() otherwise)

Vault.decryptVariable key base64Val
Signature: key:KeyInfo -> base64Val:string -> string

decrypt a given base64 encoded string and return the utf-8 string of the result

Signature: Vault

An empty vault without any variables

Vault.encryptVariable key value
Signature: key:KeyInfo -> value:string -> string

encrypt the given utf-8 string and return the base64 encoded result

Vault.fromEncryptedVariables key vars
Signature: key:KeyInfo -> vars:seq<Variable> -> Vault

Read a vault from the given encrypted variables

Signature: envVar:string -> Vault

Read a vault from an environment variable.

Signature: envVar:string -> Vault option

Read a vault from an environment variable or return None

Signature: unit -> Vault option

Read a vault from FAKE_VAULT_VARIABLES

Signature: unit -> Vault

Read a vault from FAKE_VAULT_VARIABLES

Signature: s:string -> Vault

Read in a vault from a given json string, make sure to delete the source of the json after using this API

Vault.fromVariable key v
Signature: key:KeyInfo -> v:Variable -> string

Retrieve the value from a given variable

Vault.get name v
Signature: name:string -> v:Vault -> string

similar to tryGet but throws an exception if the variable with the given name is not available in the vault

Vault.tryGet name v
Signature: name:string -> v:Vault -> string option

try to retrieve the variable with the given name from the vault (decrypts the variable if needed)