GithubHelp home page GithubHelp logo

khalidahmedshalabi / generatevalidatescratchcards Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 662 KB

A demo of a scratch cards generator & validator

Home Page: https://khalidahmedshalabi.github.io/GenerateValidateScratchCards/

CSS 27.44% HTML 13.72% JavaScript 58.84%
luhn-algorithm luhn-checksum format-preserving-encryption shuffle scratchcard

generatevalidatescratchcards's Introduction

Generate & Validate Scratch Cards

A demo of a scratch cards generator & validator.

Use

  • Generate scratch cards. Each card can hold a specific value, that can be recharge amount for example, if we're at a company that generates recharge cards for its customers.
  • Validate scratch cards. Validate the cards you generated and check if a card has expired.

Briefly, how it works

  • Card numbers are stored in hash tables for better performance with a key of the current timestamp when a card is generated. Key and card amount are mixed, then shuffled and finally encrypted using Format-perserving Encryption. At the end, Luhn algorithm is applied to the final card number and it's delivered to the customer.
  • Different algorithms and different keys are used based on current date and time which enables us to check expiration.
  • For validation, we do the same processes, but in reverse.

generatevalidatescratchcards's People

Contributors

khalidahmedshalabi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

manniru

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.