Giter Site home page Giter Site logo

checkluhn's Introduction

CheckLuhn

Build Status AppVeyor Build Status Coverage Status Rdoc

Overview

checkLuhn is package to assist checking PANs (credit/debit card number) or any other number that uses the Luhn algorithum to validte.

The algorithm is in the public domain and is in wide use today. It is specified in ISO/IEC 7812-1. It is not intended to be a cryptographically secure hash function; it was designed to protect against accidental errors, not malicious attacks. Most credit cards and many government identification numbers use the algorithm as a simple method of distinguishing valid numbers from mistyped or otherwise incorrect numbers.

The issuer function will can return the Card Issuer/Scheme and if that scheme is active or not

Installation

# The easiest way to get checkLuhn:
install.packages("checkLuhn")

Development version

To get a bug fix, or use a feature from the development version, you can install dplyr from GitHub.

# install.packages("devtools")
devtools::install_github("adamjdeacon/checkLuhn")

Usage

library(checkLuhn)

# Invalid number
input <- "4111 2234 2242 1234"
checkLuhn(input)
[1] FALSE

# Valid number
input <- "34000000 0000 009"
checkLuhn(input)
[1] TRUE

# Check for card type
input <- '378282246310005'
> issuer(input)
# A tibble: 1 x 2
  issuer           active
  <chr>            <chr> 
1 American Express Yes  

Getting help

If you encounter a clear bug, please file a minimal reproducible example on github.

checkluhn's People

Contributors

adamjdeacon avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.