RoboNet.EMVParser
0.6.1
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
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" />
<PackageReference Include="RoboNet.EMVParser" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=RoboNet.EMVParser&version=0.6.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EMV Parser
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 | Versions 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.
-
.NETStandard 2.1
- System.Text.Encoding.CodePages (>= 9.0.3)
-
net5.0
- System.Text.Encoding.CodePages (>= 5.0.0)
-
net8.0
- System.Text.Encoding.CodePages (>= 9.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.