This repo has programs which use the Azure SDK for C++ and Rust to retrieve a key from an Azure Key Vault and then encrypt or decrypt messages with it.
The encryption program is written in C++ and is in the encrypt
folder. The decryption program is written in Rust and is in the decrypt
folder.
Install vcpkg, then:
$ vcpkg install --triplet=x64-windows-static --feature-flags=manifests
Then build with CMake using your prefered method.
$ cargo build
The following environment flags are expected to be set for both encrypt
and decrypt
:
AZURE_CLIENT_ID
: Azure ActiveDirectory application registration client IDAZURE_CLIENT_SECRET
: Azure ActiveDirectory application registration client secretAZURE_TENANT_ID
: Azure ActiveDirectory application registration tenant IDAZURE_KEY_VAULT_URI
: The URI of the Azure Key VaultAZURE_KEY_NAME
: The name of the Azure Key Vault key
$ ./azure_encrypt
$ cargo run