FirmaSAT

Programming interfaces and example code

VB.NET/VB2010+
VB.NET programming - how to use in a VB.NET/VB2010+ program.
TestFirmaSat.vb - some tests using the FirmaSAT .NET interface in VB.NET/VB2010+.
C#
C# programming - how to use in a C# program.
TestFirmaSat.cs - some tests using the FirmaSAT .NET interface in C#.
Console.WriteLine("\nSIGN AN XML FILE:");
fname = "cfdv33a-base.xml";
newname = "cfdv33a_new-signed.xml";
keyfile = "emisor.key";
password = "12345678a";   /* CAUTION: DO NOT HARD-CODE REAL PASSWORDS! */
certfile = "emisor.cer";
n = Sat.SignXml(newname, fname, keyfile, password, certfile);
Console.WriteLine("Sat.SignXml('{0}'-->'{1}') returns {2}", fname, newname, n);
Debug.Assert(n == 0, "Sat.SignXml failed");
// Did we make a valid XML file?
n = Sat.ValidateXml(newname);
Console.WriteLine("Sat.ValidateXml('{0}') returns {1}", newname, n);
Debug.Assert(n == 0, "Sat.ValidateXml failed");
.NET Core
.NET Core Interface for FirmaSAT - how to use FirmaSAT with .NET Core (dotnetcore).
VB6/VBA
VBA/VB6 programming - how to use in a VB6 project or Microsoft Office VBA application.
basFirmaSAT.bas - declaration statements, constants and wrapper functions for VB6/VBA interface.
TestFirmaSat.bas - some tests using the FirmaSAT VB6/VBA interface.
Debug.Print (vbLf & "SIGN AN XML FILE:")
fname = "cfdv33a-base.xml"
newname = "cfdv33a_new-signed.xml"
keyfile = "emisor.key"
password = "12345678a"    ' CAUTION: DO NOT HARD-CODE REAL PASSWORDS!
certfile = "emisor.cer"
n = SAT_SignXml(newname, fname, keyfile, password, certfile, 0)
Debug.Print "SAT_SignXml('" & fname & "'-->'" & newname & "') returns " & n
Debug.Assert (n = 0)
' Did we make a valid XML file?
n = SAT_ValidateXml(newname, 0)
Debug.Print "SAT_ValidateXml(" & newname & ") returns " & n
Debug.Assert (n = 0)
C/C++
C/C++ Programming - how to use in an ANSI C or C++ program.
diFirmaSat2.h - interface for ANSI C programmers (and reference for Delphi/FoxPro/Clarion, etc)
diFirmaSat2.h File Reference - a detailed reference to the ANSI C interface to the diFirmaSAT2.dll library. (created by Doxygen)
TestFirmaSat.c - some tests using the FirmaSAT ANSI C interface.
C++ (STL)
C++ (STL) interface to FirmaSAT
TestFirmaSat.cpp - some tests using the C++ (STL) interface.
Python
Python Interface to FirmaSATNew
test_firmasat.py - some tests using the Python interface.
Java
See Java Interface to FirmaSAT.
Delphi/Free Pascal
See Using Delphi and Free Pascal.
Interfaces to other programming languages
See Writing an interface in another programming language for advice and examples in how to use FirmaSAT with other programming languages.