Data Vault
Data Vault is a library for storing and retrieving Credit Card data via Tokens.
# Cargo.toml
[]
= "^0.2"
# .env OR environment variables
REDIS_URL=redis://:foobared@127.0.0.1/
# REDIS_POOL_MAX_SIZE=16
ENCRYPTED_DATA_VAULT_KEY=000102030405060708090a0b0c0d0e0f
ENCRYPTED_DATA_VAULT_IV=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
// example.rs
// traits
use DataVault;
use Encryption;
// data vault
use RedisDataVault;
// swappable encryption
use AesGcmSivEncryption;
// swappable tokenizer
use Blake3Tokenizer;
// credit card type
use CreditCard;
use tokio;
async
Current Features
- Store Credit Cards
- Store
String
- Automatic Encryption and Decryption
- Blake3 tokenization
- Redis Server, URL connection configuration
- Configurable from .env file or Environment Variables
- Swappable Encryption
- Swappable Tokenization hasher
Future Features
- Postgres Database
Performance
This example output the following performance stats with an AMD Ryzen 9 3900X. Showing the possibility of tokenizing ~100,000 credit cards per second.
tokenized and stored 100000 credit cards in 1.058474365s
retrieved 100000 credit cards in 5.353857633s
tokenized, stored, and retrieved 100000 credit cards in 6.412331998s
Notice:
This is under development right now, so interfaces and apis will be changing. If you are interested in using this please create an issue or reach out with your feature request so I can help add it.