Data Vault
Data Vault is a library for storing and retrieving Credit Card data via Tokens.
add data_vault as a dependency to Cargo.toml
= "^0.2"
# traits
use crate DataVault;
use crate Encryption;
# data vault
use crate RedisDataVault;
# swappable encryption
use crate AesGcmSivEncryption;
# swappable tokenizer
use crate Blake3Tokenizer;
# credit card type
use CreditCard;
let vault = new.unwrap;
let cc = CreditCard ;
let token = vault.store_credit_card.await.unwrap;
let credit_card = vault.retrieve_credit_card.await.unwrap;
assert_eq!
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
- Swappable Tokenization hasher
- 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.