An open API service indexing awesome lists of open source software.

https://github.com/zeyu-li/credit-card-validator

A Rusty Credit Card Validator 💳
https://github.com/zeyu-li/credit-card-validator

credit-card-validation luhn-algorithm

Last synced: 11 months ago
JSON representation

A Rusty Credit Card Validator 💳

Awesome Lists containing this project

README

          

# Credit Card Validator

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

A rust script to check if a credit card is valid

## How it works

Best way to get up to speed is to watch this [HaI video](https://www.youtube.com/watch?v=gwVmE8gcqrg&t=28s), but the short version of it is:

1. Check length to see if it exceeds standard credit card length
2. Check the first 6 digits to see if they match an issued institution
3. Check the check digit that uses Luhn's algorithm