SimpleISO7064 2.0.1

dotnet add package SimpleISO7064 --version 2.0.1                
NuGet\Install-Package SimpleISO7064 -Version 2.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SimpleISO7064" Version="2.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimpleISO7064 --version 2.0.1                
#r "nuget: SimpleISO7064, 2.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SimpleISO7064 as a Cake Addin
#addin nuget:?package=SimpleISO7064&version=2.0.1

// Install SimpleISO7064 as a Cake Tool
#tool nuget:?package=SimpleISO7064&version=2.0.1                

Simple ISO 7064

C# library that provide ISO 7064 implementations to verify or calculate check characters.

Out of the box, the library supports the following pure systems:

  • Modulus 11 with Radix 2
  • Modulus 37 with Radix 2
  • Modulus 97 with Radix 10
  • Modulus 661 with Radix 26
  • Modulus 1271 with Radix 36

Installation

This library can be installed via NuGet package. Just run the following command:

Install-Package SimpleISO7064

Compatibility

This library directly targets the following frameworks:

  • .NET Standard 1.0;
  • .NET Standard 2.0;
  • .NET Framework 2.0;
  • .NET Framework 4.0;
  • .NET 5.0;

Usage

Basic example (using Mod 11 Radix 2 singleton):

const string value = "101100002683118740";

IIso7064PureSystemProvider provider = Iso7064.PureSystem.Mod11Radix2;

// computes the check digit -> 7
var checkDigit = provider.ComputeCheckDigit(value);

// computes the value with the check digit -> 1011000026831187407
var computed = provider.Compute(value);

// checks if the value is valid -> true
var isValid = provider.IsValid(computed);

Out of the box pure systems are available in the Iso7064.PureSystem namespace.

var mod11Radix2 = new Mod11Radix2();
var mod37Radix2 = new Mod37Radix2();
var mod97Radix10 = new Mod97Radix10();
var mod661Radix26 = new Mod661Radix26();
var mod1271Radix36 = new Mod1271Radix36();

Since the pure system implementations are thread safe, it is recommended to use the singleton instances available in the Iso7064.PureSystem class.

var mod11Radix2 = Iso7064.PureSystem.Mod11Radix2;
var mod37Radix2 = Iso7064.PureSystem.Mod37Radix2;
var mod97Radix10 = Iso7064.PureSystem.Mod97Radix10;
var mod661Radix26 = Iso7064.PureSystem.Mod661Radix26;
var mod1271Radix36 = Iso7064.PureSystem.Mod1271Radix36;

You can also create your own pure systems either by creating a new instance of Iso7064PureSystemProvider, using the builder method provided by the Iso7064Factory class or by implementing the IIso7064PureSystemProvider interface.

// using the constructor
var provider = new Iso7064PureSystemProvider(11, 2, false, "0123456789X");

// using the factory
var provider = Iso7064.Factory.Get(11, 2, false, "0123456789X");
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.0 is compatible.  netstandard1.1 was computed.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net20 is compatible.  net35 was computed.  net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wp8 was computed.  wp81 was computed.  wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 2.0

    • No dependencies.
  • .NETFramework 4.0

    • No dependencies.
  • .NETStandard 1.0

  • .NETStandard 2.0

    • No dependencies.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 20,519 8/7/2024
2.0.0 111 8/6/2024
1.0.0 297,229 8/8/2016