Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.04 KB

README.md

File metadata and controls

33 lines (25 loc) · 1.04 KB

BBAN generator

Simple BBAN generator & validator

Go Report Card GoDoc Build Status Coverage Status

Installation

go get github.com/m1ome/bban_gen

Usage

package main

import (
    "fmt"

    bban "github.com/m1ome/bban_gen"
)

func main() {
	account := bban.Random("040577", "13439317554524", bban.DoubleMod)
	fmt.Printf("Generated account: %s\n", account)

	next := bban.Next("040577", account, "13439317554524", bban.DoubleMod)
	fmt.Printf("Next account: %s\n", next)

	fmt.Printf("Validity passing: %v\n", bban.Validate("040577", next, "13439317554524", bban.DoubleMod))
}