1 unstable release

0.1.0 Aug 3, 2020

#6 in #credit

MIT license

5KB
50 lines

Financial Tokenizer

Financial Tokenizer is a library for tokenizing credit card data.

add tokenizer as a dependency to Cargo.toml

[dependencies]
financial_tokenizer = "0.1.0"
use credit_card::CreditCard;
use tokenizer::Tokenizer;

let cc = CreditCard {
    number: "4111111111111111".to_string(),
    cardholder_name: "Graydon Hoare".to_string(),
    expiration_month: "01".to_string(),
    expiration_year: "2023".to_string(),
    brand: Option::from("visa".to_string()),
    security_code: Option::from("123".to_string())
};
let token = Tokenizer::generate(&cc);
assert_eq!(token.len(), 64);
let token2 = Tokenizer::generate(&cc);
assert_ne!(token, token2)
};

Current Features

Future Features

  • Swappable hash functions
  • Tokenize other data types. (String, Vec, bytes, ...)
  • Tokenize debit cards, bank accounts, and other financial data

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.

Dependencies

~5.5–7.5MB
~151K SLoC