RoboNet.EMVParser 0.6.1

dotnet add package RoboNet.EMVParser --version 0.6.1
                    
NuGet\Install-Package RoboNet.EMVParser -Version 0.6.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="RoboNet.EMVParser" Version="0.6.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RoboNet.EMVParser" Version="0.6.1" />
                    
Directory.Packages.props
<PackageReference Include="RoboNet.EMVParser" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RoboNet.EMVParser --version 0.6.1
                    
#r "nuget: RoboNet.EMVParser, 0.6.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.
#addin nuget:?package=RoboNet.EMVParser&version=0.6.1
                    
Install RoboNet.EMVParser as a Cake Addin
#tool nuget:?package=RoboNet.EMVParser&version=0.6.1
                    
Install RoboNet.EMVParser as a Cake Tool

EMV Parser NuGet Version 

Span API based EMV TLV parser for .NET. This library is designed to parse EMV data structures, specifically the BER-TLV (Tag-Length-Value) format used in EMV transactions.

Features

  • 🚀 High-performance parsing using Span API
  • 📦 Support for both Memory<byte> and Span<byte>
  • 🔍 Automatic detection and parsing of constructed tags
  • 🎯 Support for long tags and multi-byte lengths
  • 🛠️ Convenient extension methods for working with tag lists
  • 💡 Performance optimization and minimal memory allocation
  • 📝 Built-in EMV tags dictionary with descriptions and strongly-typed constants
  • 📝 Comprehensive documentation in English and Russian

Installation

dotnet add package RoboNet.EMVParser

Quick Start

Get all tags from EMV data:

var someEMVData = "5F2A02097882021C00950580800088009A032110149C01009F02060000000020219F03060000000000009F0902008C9F100706010A03A480109F1A0202769F26080123456789ABCDEF9F2701809F3303E0F0C89F34034103029F3501229F3602003E9F37040F00BA209F41030010518407A0000000031010";
var data = Convert.FromHexString(someEMVData);

// Get all tags
IReadOnlyList<TagPointer> tagsList = EMVTLVParser.ParseTagsList(data);

foreach (var tag in tagsList)
{
    Console.WriteLine($"Tag: {tag.TagHex}, Value: {tag.ValueHex}");
}

Get specific tag value from EMV data:

// Get value of tag 5F2A
Span<byte> tagValue = EMVTLVParser.ReadTagValue(data.AsSpan(), "5F2A"); 
Console.WriteLine("Tag 5F2A value: " + Convert.ToHexString(tagValue));

Main Features

TagPointer Class

The main class for working with TLV data provides:

  • Complete TLV data access
  • Tag and value manipulation
  • Support for constructed tags
  • Convenient hex and string value representations
  • Numeric value conversion

Working with Tags

// Search in tag list
var tag = tagsList.GetTag("5F2A");

// Get value in different formats
string hexValue = tagsList.GetTagValueHex("5F2A");
Memory<byte> byteValue = tagsList.GetTagValue("5F2A");
string stringValue = tag.ValueString;
long numericValue = tag.ValueNumeric;

Documentation

For detailed information about working with the library, please refer to the documentation:

License

This project is licensed under the MIT License - see the LICENSE file for details.

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 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 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.

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
0.6.1 439 3/26/2025
0.6.0 243 3/23/2025
0.5.0 130 3/19/2025
0.4.0 107 3/9/2025
0.3.4 152 3/8/2025
0.3.3 132 3/8/2025
0.3.1 198 3/7/2025
0.3.0 193 3/7/2025
0.2.2 195 3/6/2025
0.2.1 198 3/6/2025
0.2.0 192 3/6/2025
0.1.3 195 3/6/2025
0.1.2 187 3/6/2025