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.34.0"
Creating a ZeroKMS Client
Use [ZeroKMSBuilder] to create a new [ZeroKMS] client. With this you can:
- Manage keysets, config and clients
- Encrypt and decrypt data
use cipherstash_client::zerokms::ZeroKMSBuilder;
#[tokio::main]
async fn main() {
let client = ZeroKMSBuilder::auto()
.expect("failed to detect credentials")
.build()
.expect("failed to build client");
let keyset = client.create_keyset("users", "A keyset used to encrypt my users' information")
.await
.expect("failed to create keyset");
}
Creating a CTS Client
Use [CtsClient] to manage access keys and identity tokens:
use ;
use Role;
use ;
async