Vimes.SignSDK 1.0.19

dotnet add package Vimes.SignSDK --version 1.0.19
                    
NuGet\Install-Package Vimes.SignSDK -Version 1.0.19
                    
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="Vimes.SignSDK" Version="1.0.19" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vimes.SignSDK" Version="1.0.19" />
                    
Directory.Packages.props
<PackageReference Include="Vimes.SignSDK" />
                    
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 Vimes.SignSDK --version 1.0.19
                    
#r "nuget: Vimes.SignSDK, 1.0.19"
                    
#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 Vimes.SignSDK@1.0.19
                    
#: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=Vimes.SignSDK&version=1.0.19
                    
Install as a Cake Addin
#tool nuget:?package=Vimes.SignSDK&version=1.0.19
                    
Install as a Cake Tool

Vimes.SignSDK

A lightweight, infrastructure-agnostic library for digital signature integration. This SDK supports multiple merchants (SmartCA, Viettel MySign, VNPT, USB Token, etc.) and provides a simplified interface for signing PDF documents using purely file-system and in-memory operations.

🚀 Quick Start

1. Installation

Install the package via NuGet:

dotnet add package Vimes.SignSDK

2. Configuration

Add the following configuration to your appsettings.json. The SDK is now database-free and uses local storage for temporary files and logs.

{
  "InternalSetting": {
    "HospitalName": "Your Hospital",
    "CompanyName": "Your Company",
    "DefaultMerchantId": "VIETTEL",
    "SignatureMode": 0,
    "IsEnableRegisterExtension": true
  },
  "FileStorageSetting": {
    "WebRootFallback": "wwwroot",
    "ExportFolderName": "export",
    "CertsFolderName": "certs"
  },
  "MySignSetting": {
    "BaseUrl": "https://remotesigning.viettel.vn",
    "ProfileId": "your-profile-id",
    "ClientId": "your-client-id",
    "ClientSecret": "your-client-secret"
  },
  "CacheSetting": {
    "Backend": "Memory"
  }
}

3. Dependency Injection

Register the SignSDK services in your Program.cs. The SDK requires standard ASP.NET Core environment and logging services.

using SignSDK;

var builder = WebApplication.CreateBuilder(args);

// Register the infrastructure-agnostic SignSDK
builder.Services.AddSignSDK(builder.Configuration);

var app = builder.Build();

4. Basic Usage

Inject ISignSDKClient to start signing documents programmatically:

public class MyHospitalService
{
    private readonly ISignSDKClient _signClient;

    public MyHospitalService(ISignSDKClient signClient)
    {
        _signClient = signClient;
    }

    public async Task SignPatientRecord(string userName, string password, byte[] pdfData)
    {
        // 1. Login to merchant
        var session = await _signClient.LoginAsync(userName, password, "VIETTEL");
        if (!session.Success) throw new Exception(session.ErrorMessage);

        // 2. Get available certificates
        var certs = await _signClient.GetCertificatesAsync(userName, session.BearerToken);
        
        // 3. Sign the document
        var result = await _signClient.SignDocumentAsync(new SignDocumentRequest
        {
            UserName = userName,
            MerchantId = "VIETTEL",
            CredentialID = certs[0].credentialID,
            FileName = "record.pdf",
            FileData = Convert.ToBase64String(pdfData),
            SignerName = "Dr. Smith",
            Page = 1,
            X = 100, Y = 100, Width = 150, Height = 75
        });

        if (result.Success) {
            Console.WriteLine($"Signed file: {result.SignedFileUrl}");
        }
    }
}

📦 Architecture (Lightweight Version)

  • Infrastructure Agnostic: Zero dependency on EF Core, SQL Server, or PostgreSQL.
  • Stateless Operation: No internal database state. Host applications manage their own persistence.
  • Zero-Redis: Uses MemoryCache by default for session and certificate caching.
  • File-Based Logging: Audit logs and signatures are tracked via Serilog text sinks.
  • Merchant Plugins: Includes built-in support for major Vietnamese CAs via a plugin-based architecture.

📂 Samples

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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 (1)

Showing the top 1 NuGet packages that depend on Vimes.SignSDK:

Package Downloads
Vimes.SignSDK.Merchants.BCY.Domain

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.19 47 6/19/2026
1.0.18 51 6/17/2026
1.0.17 56 6/16/2026
1.0.10 127 6/5/2026
1.0.9 116 6/5/2026
1.0.8 87 6/5/2026
1.0.7 93 6/5/2026
1.0.5 141 5/23/2026