# eStealth SDK

> The eStealth SDK for JVM languages, Python and PHP, with a Java example of storing personal data in the vault and keeping only tokens in business databases.

# Language Variants
We strive to offer an SDK for use with every popular programming languages out there.

- SDK for JVM Languages (Java, Kotlin, Groovy, Clojure, ...)
- Python 3
- PHP

If you're programming in a language not listed here, please get in touch to discuss adding your language.

# Java

```java
// configuration
final URL server = new URL("https://trial.estealth.ch/");
final VaultCredential cred = new VaultCredential("....");

// assuming specific role and claim a purpose
try (final VaultContext ctx = Vault.newVaultContext(server, cred)) {
    // the business db only contains tokens, no sensitive data
    final String token = getTokenFromBusinessDB();

    // explicitly read sensitive data from the vault
    final VaultDataset dataset = ctx.read(token);
    System.out.println(dataset.get("address.home"));

    // update sensitive data and write changes to vault
    dataset.put("salary.amount", "9999.99");
    dataset.put("salary.currency", "CHF");
    ctx.write(dataset);
}
```
