Skip to content

Commit

Permalink
Add mod97-10 alphanumeric variant used to check ibans (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoelho authored May 25, 2021
1 parent 2106303 commit 3b8b234
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ ci-tidy:
escape:
go build -gcflags='-m' ./...

.PHONY: ci-tidy escape test
bounds:
go build -gcflags="-d=ssa/check_bce/debug=3" ./...

.PHONY: ci-tidy escape test bounds
6 changes: 6 additions & 0 deletions iso7064/pure.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ func Modulo97Radix10(input string) string {
return pure(97, 10, true, numericToValue, numericToString, input)
}

// Modulo97Radix10Alphanumeric variant generates check characters in accordance with ISO/IEC 7064, MOD 97–10
// Supports an alphanumeric input, used to validate IBANs
func Modulo97Radix10Alphanumeric(input string) string {
return pure(97, 10, true, alphanumericToValue, numericToString, input)
}

// Modulo661Radix26 generates check characters in accordance with ISO/IEC 7064, MOD 661–26
// Designation 4
func Modulo661Radix26(input string) string {
Expand Down

0 comments on commit 3b8b234

Please sign in to comment.