KSeFSigner 1.0.1

dotnet add package KSeFSigner --version 1.0.1
                    
NuGet\Install-Package KSeFSigner -Version 1.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="KSeFSigner" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KSeFSigner" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="KSeFSigner" />
                    
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 KSeFSigner --version 1.0.1
                    
#r "nuget: KSeFSigner, 1.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.
#:package KSeFSigner@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KSeFSigner&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=KSeFSigner&version=1.0.1
                    
Install as a Cake Tool

KSeFSigner

KSeFSigner is an unofficial .NET 8 workaround for signing XML documents (AuthTokenRequest) in XAdES-BES format for KSeF API 2.0 (Polish National e-Invoicing System). Addresses the ECDSA-SHA256 support gap in .NET 8.

Feel free to open an issue to report bugs or request new features.

FEATURES:

* XAdESSigner.Sign(xml, certificate) - sign using X509Certificate2 object

* XAdESSigner.Sign(xml, certContent, keyContent, keyPassword) - sign using raw strings

* XAdESSigner.Sign(xml, certContent, keyContent, securePassword) - sign using SecureString password

* CertificateLoader.Load(certContent, keyContent, keyPassword) - load X509Certificate2 from strings

* CertificateLoader.Load(certContent, keyContent, securePassword) - load X509Certificate2 using SecureString password

* Built-in ECDSA-SHA256 registration for SignedXml

* SecureString support for password handling - password is zeroed from memory after use

* Works with UiPath!

REQUIREMENTS:

* .NET 8 (net8.0-windows)

* ECDSA P-256 certificate from KSeF Certification Center (CCK MF)

SecureString support for password handling - password is zeroed from memory after use

INPUT XML (replace {challenge} and {nip}):


<?xml version="1.0" encoding="utf-8"?>

<AuthTokenRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://ksef.mf.gov.pl/auth/token/2.0">

&#x20; <Challenge>{challenge}</Challenge>

&#x20; <ContextIdentifier>

&#x20;   <Nip>{nip}</Nip>

&#x20; </ContextIdentifier>

&#x20; <SubjectIdentifierType>certificateSubject</SubjectIdentifierType>

</AuthTokenRequest>

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows 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
1.0.1 98 6/5/2026
1.0.0 93 6/2/2026

1.0.1
- Changes in csproj:
- tags,projectUrl, description, added relasenots
- Updated README
- Added RELEASE-NOTES file
1.0.0
- Initial release