Click or drag to resize

SatGetCertAsString Method

Get certificate data as a base64 string.

Namespace: FirmaSAT
Assembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.70.0.38178 (10.70.0.0)
Syntax
public static string GetCertAsString(
	string fileName
)

Parameters

fileName  String
X.509 certificate file or XML file with Certificado node

Return Value

String
Certificate data as a string of base64 characters
Remarks
Use to obtain the value for the Certificado node from a .CER file. If input is an XML file, this is equivalent to Sat.GetXmlAttribute(fileName, "Certificado", "Comprobante")
Example
C#
Console.WriteLine(Sat.GetCertAsString("emisor.cer"));
// MIIF+TCCA+GgAwIBAgIUMzAwMDEwMDAwMDAzMDAw ...
See Also