Skip to main content

Write To and Read From the Vault

Run the Example

You can write a value associated to a key by running the following command from the client crate. The example will also read from the vault to retrieve the key pair you have created. Feel free to replace the parameter values as you see fit.

cargo run --example cli store-read-write  --key "yourKey" --value "yourValue"

Expected Output

[2022-06-28T13:36:12Z INFO  cli] Insert value into store "yourValue" with key "yourKey"
[2022-06-28T13:36:12Z INFO cli] Store contains key "yourKey" ? true
[2022-06-28T13:36:12Z INFO cli] Value for key "yourKey" ? "yourValue"

Example Code