helper

package
v0.0.0-...-192b32d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2017 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

A credit card number is composed by a six-digit Issuer Identification Number (IIN), a variable length (7-12) individual account identifier and a single check digit.

Index

Constants

View Source
const (
	// The radix to cipher Credit Cards (i.e. decimal numbers) is 10
	CCRadix = 10
)

Variables

This section is empty.

Functions

func SetAlphabet

func SetAlphabet(dstMap map[rune]uint16, dstSlice []rune, alphabet string) error

Types

type FpeCreditCard

type FpeCreditCard interface {
	// Crypt encrypts or decrypts a credit card number.
	Crypt(src string) (string, error)
}

func NewFPECreditCardProcessor

func NewFPECreditCardProcessor(m cipher.BlockMode) FpeCreditCard

type FpeString

type FpeString interface {
	// Crypt encrypts or decrypts a string.
	Crypt(in string) (string, error)
	SetTweak(tweak []byte)
}

func NewFpeStringProcessor

func NewFpeStringProcessor(m cipher.BlockMode, alphabet string) FpeString

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL