CipherStash Client SDK
Website | Docs | Discussions
The CipherStash SDK is the main way of interacting with CipherStash services. It includes clients for talking to ZeroKMS, CipherStash Token Service (CTS) and the services used to power Audit.
It also contains all the indexing and encryption logic used in CipherStash products.
Getting Started
To get started add the cipherstash-client dependency to your Cargo.toml
[]
= "0.28.0"
Creating a ZeroKMS Client
Use the [ZeroKMSConfig] to create a new [ZeroKMS] client. With this you can:
- Manage datasets, config and clients
- Encrypt and decrypt data
use cipherstash_client::{ZeroKMSConfig, config::EnvSource};
#[tokio::main]
async fn main() {
let client = ZeroKMSConfig::builder()
.add_source(EnvSource::new())
.build()
.expect("failed to build config")
.create_client();
let keyset = client.create_dataset("users", "A keyset used to encrypt my users' information")
.await
.expect("failed to create keyset");
}
Creating a CTS Client
Use the [CtsConfig] struct to create a new [CtsClient]. With this you can:
- Manage access keys and identity tokens
use ;
use Role;
async