├── .github └── workflows │ └── CICD.yml ├── .vs ├── ProjectEvaluation │ ├── fiscalapi-credentials.metadata.v9.bin │ ├── fiscalapi-credentials.projects.v9.bin │ └── fiscalapi-credentials.strings.v9.bin └── fiscalapi-credentials │ ├── CopilotIndices │ └── 17.12.31.40377 │ │ ├── CodeChunks.db │ │ ├── SemanticSymbols.db │ │ ├── SemanticSymbols.db-shm │ │ └── SemanticSymbols.db-wal │ ├── DesignTimeBuild │ └── .dtbcache.v2 │ ├── FileContentIndex │ ├── 079ae570-c1ad-4e7e-8a2e-e03c94516a80.vsidx │ ├── 4672cd93-74c5-4b2f-81a4-441d2dda5985.vsidx │ ├── 7b5e330d-0833-4d2a-aab6-e1d2591dd276.vsidx │ ├── 83ab4a4f-1be1-4320-8d2c-4bf6a95ae0d3.vsidx │ └── dc1557e4-e6fc-4887-a6b2-a41da966b426.vsidx │ └── v17 │ ├── .futdcache.v2 │ ├── .suo │ ├── DocumentLayout.backup.json │ └── DocumentLayout.json ├── Common ├── CredentialSettings.cs ├── CredentialType.cs ├── FileType.cs ├── Flags.cs ├── HelpersToVerify.cs ├── StringExtensions.cs └── Utf8StringWriter.cs ├── Core ├── Certificate.cs ├── Credential.cs ├── ICertificate.cs ├── ICredential.cs ├── IPrivateKey.cs └── PrivateKey.cs ├── LICENSE.txt ├── README.md ├── bin └── Debug │ ├── Credentials.4.0.95.nupkg │ ├── Fiscalapi.Credentials.4.0.95.nupkg │ ├── net6.0 │ ├── Fiscalapi.Credentials.deps.json │ ├── Fiscalapi.Credentials.dll │ └── Fiscalapi.Credentials.pdb │ ├── net8.0 │ ├── Fiscalapi.Credentials.deps.json │ ├── Fiscalapi.Credentials.dll │ └── Fiscalapi.Credentials.pdb │ └── net9.0 │ ├── Fiscalapi.Credentials.deps.json │ ├── Fiscalapi.Credentials.dll │ └── Fiscalapi.Credentials.pdb ├── fiscalapi-credentials.csproj ├── fiscalapi-credentials.sln ├── fiscalapi.ico ├── fiscalapi.png └── obj ├── Debug ├── Credentials.4.0.95.nuspec ├── Fiscalapi.Credentials.4.0.95.nuspec ├── net6.0 │ ├── .NETCoreApp,Version=v6.0.AssemblyAttributes.cs │ ├── Fiscalapi.Credentials.dll │ ├── Fiscalapi.Credentials.pdb │ ├── fiscalapi-credentials.AssemblyInfo.cs │ ├── fiscalapi-credentials.AssemblyInfoInputs.cache │ ├── fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig │ ├── fiscalapi-credentials.assets.cache │ ├── fiscalapi-credentials.csproj.CoreCompileInputs.cache │ ├── fiscalapi-credentials.csproj.FileListAbsolute.txt │ ├── ref │ │ └── Fiscalapi.Credentials.dll │ └── refint │ │ └── Fiscalapi.Credentials.dll ├── net8.0 │ ├── .NETCoreApp,Version=v8.0.AssemblyAttributes.cs │ ├── Fiscalapi.Credentials.dll │ ├── Fiscalapi.Credentials.pdb │ ├── fiscalapi-credentials.AssemblyInfo.cs │ ├── fiscalapi-credentials.AssemblyInfoInputs.cache │ ├── fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig │ ├── fiscalapi-credentials.GlobalUsings.g.cs │ ├── fiscalapi-credentials.assets.cache │ ├── fiscalapi-credentials.csproj.CoreCompileInputs.cache │ ├── fiscalapi-credentials.csproj.FileListAbsolute.txt │ ├── ref │ │ └── Fiscalapi.Credentials.dll │ └── refint │ │ └── Fiscalapi.Credentials.dll └── net9.0 │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs │ ├── Fiscalapi.Credentials.dll │ ├── Fiscalapi.Credentials.pdb │ ├── fiscalapi-credentials.AssemblyInfo.cs │ ├── fiscalapi-credentials.AssemblyInfoInputs.cache │ ├── fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig │ ├── fiscalapi-credentials.assets.cache │ ├── fiscalapi-credentials.csproj.CoreCompileInputs.cache │ ├── fiscalapi-credentials.csproj.FileListAbsolute.txt │ ├── ref │ └── Fiscalapi.Credentials.dll │ └── refint │ └── Fiscalapi.Credentials.dll ├── fiscalapi-credentials.csproj.nuget.dgspec.json ├── fiscalapi-credentials.csproj.nuget.g.props ├── fiscalapi-credentials.csproj.nuget.g.targets ├── project.assets.json └── project.nuget.cache /.github/workflows/CICD.yml: -------------------------------------------------------------------------------- 1 | name: Publish NuGet Package 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | build-and-publish: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | # Checkout the repository 12 | - name: Checkout repository 13 | uses: actions/checkout@v3 14 | 15 | # Setup .NET 16 | - name: Setup .NET 17 | uses: actions/setup-dotnet@v3 18 | with: 19 | dotnet-version: '9.0.x' 20 | 21 | # Restore dependencies 22 | - name: Restore dependencies 23 | run: dotnet restore 24 | 25 | # Step to extract the AssemblyVersion from the .csproj file 26 | - name: Extract Package Version 27 | id: get_version 28 | run: | 29 | version=$(grep -oPm1 "(?<=)[^<]+" $(find . -name "*.csproj")) 30 | echo "PACKAGE_VERSION=$version" >> $GITHUB_ENV 31 | echo "Package Version extracted: $version" 32 | 33 | # Build the project 34 | - name: Build the project 35 | run: dotnet build --configuration Release 36 | 37 | # Pack the NuGet package 38 | - name: Pack NuGet Package 39 | run: dotnet pack --configuration Release --output ./nupkg 40 | 41 | # Publish the package to NuGet 42 | - name: Publish to NuGet 43 | env: 44 | NUGET_KEY: ${{ secrets.NUGET_KEY }} 45 | run: | 46 | dotnet nuget push ./nupkg/*.nupkg \ 47 | --api-key $NUGET_KEY \ 48 | --source https://api.nuget.org/v3/index.json 49 | -------------------------------------------------------------------------------- /.vs/ProjectEvaluation/fiscalapi-credentials.metadata.v9.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/ProjectEvaluation/fiscalapi-credentials.metadata.v9.bin -------------------------------------------------------------------------------- /.vs/ProjectEvaluation/fiscalapi-credentials.projects.v9.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/ProjectEvaluation/fiscalapi-credentials.projects.v9.bin -------------------------------------------------------------------------------- /.vs/ProjectEvaluation/fiscalapi-credentials.strings.v9.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/ProjectEvaluation/fiscalapi-credentials.strings.v9.bin -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/CodeChunks.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/CodeChunks.db -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/SemanticSymbols.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/SemanticSymbols.db -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/DesignTimeBuild/.dtbcache.v2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/DesignTimeBuild/.dtbcache.v2 -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/FileContentIndex/079ae570-c1ad-4e7e-8a2e-e03c94516a80.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/FileContentIndex/079ae570-c1ad-4e7e-8a2e-e03c94516a80.vsidx -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/FileContentIndex/4672cd93-74c5-4b2f-81a4-441d2dda5985.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/FileContentIndex/4672cd93-74c5-4b2f-81a4-441d2dda5985.vsidx -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/FileContentIndex/7b5e330d-0833-4d2a-aab6-e1d2591dd276.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/FileContentIndex/7b5e330d-0833-4d2a-aab6-e1d2591dd276.vsidx -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/FileContentIndex/83ab4a4f-1be1-4320-8d2c-4bf6a95ae0d3.vsidx: -------------------------------------------------------------------------------- 1 | CDGG '3 -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/FileContentIndex/dc1557e4-e6fc-4887-a6b2-a41da966b426.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/FileContentIndex/dc1557e4-e6fc-4887-a6b2-a41da966b426.vsidx -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/v17/.futdcache.v2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/v17/.futdcache.v2 -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/v17/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/.vs/fiscalapi-credentials/v17/.suo -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/v17/DocumentLayout.backup.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 1, 3 | "WorkspaceRootPath": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\", 4 | "Documents": [], 5 | "DocumentGroupContainers": [ 6 | { 7 | "Orientation": 0, 8 | "VerticalTabListWidth": 256, 9 | "DocumentGroups": [] 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /.vs/fiscalapi-credentials/v17/DocumentLayout.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 1, 3 | "WorkspaceRootPath": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\", 4 | "Documents": [], 5 | "DocumentGroupContainers": [ 6 | { 7 | "Orientation": 0, 8 | "VerticalTabListWidth": 256, 9 | "DocumentGroups": [] 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /Common/CredentialSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Cryptography; 2 | 3 | namespace Fiscalapi.Credentials.Common; 4 | 5 | public static class CredentialSettings 6 | { 7 | /// 8 | /// Default algorithm to sing mexican invoicing 9 | /// 10 | public static HashAlgorithmName SignatureAlgorithm { get; set; } = HashAlgorithmName.SHA1; 11 | 12 | /// 13 | /// Default signature padding 14 | /// 15 | public static RSASignaturePadding SignaturePadding { get; set; } = RSASignaturePadding.Pkcs1; 16 | 17 | /// 18 | /// Default algorithm to digest SAT services 19 | /// 20 | public static HashAlgorithm HashAlgorithm { get; set; } = SHA1.Create(); 21 | 22 | /// 23 | /// Path of the CadenaOriginal.xslt file to do XML data transformation using an XSLT stylesheet. 24 | /// 25 | public static string? OriginalStringPath { get; set; } 26 | } -------------------------------------------------------------------------------- /Common/CredentialType.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.Credentials.Common; 2 | 3 | public enum CredentialType 4 | { 5 | Csd, 6 | Fiel, 7 | } -------------------------------------------------------------------------------- /Common/FileType.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.Credentials.Common; 2 | 3 | /// 4 | /// This will be used when implementing data persistence with entity framework core. 5 | /// 6 | public enum FileType 7 | { 8 | CertificateCsd, 9 | PrivateKeyCsd, 10 | CertificateFiel, 11 | PrivateKeyFiel, 12 | Pfx, 13 | } -------------------------------------------------------------------------------- /Common/Flags.cs: -------------------------------------------------------------------------------- 1 | namespace Fiscalapi.Credentials.Common; 2 | 3 | /// 4 | /// headers and footers for PEM formats files 5 | /// 6 | public static class Flags 7 | { 8 | /// 9 | /// Header for private key 10 | /// 11 | public const string PemPrivateKey = "PRIVATE KEY"; 12 | 13 | /// 14 | /// Header for certificate 15 | /// 16 | public const string PemCertificate = "CERTIFICATE"; 17 | public const string PemPublicKey = "PUBLIC KEY"; 18 | public const string PemRsaPrivateKey = "RSA PRIVATE KEY"; 19 | public const string PemEncriptedPrivateKey = "ENCRYPTED PRIVATE KEY"; 20 | } -------------------------------------------------------------------------------- /Common/HelpersToVerify.cs: -------------------------------------------------------------------------------- 1 | //using StringBuilder = Chilkat.StringBuilder; 2 | 3 | //namespace Credencials.Common 4 | //{ 5 | // class Credentials 6 | // { 7 | // private byte[] certificateBytes; 8 | // private byte[] keyBytes; 9 | // private string password; 10 | 11 | // public Credentials(byte[] certificateBytes, byte[] keyBytes, string password) 12 | // { 13 | // this.certificateBytes = certificateBytes; 14 | // this.keyBytes = keyBytes; 15 | // this.password = password; 16 | // } 17 | 18 | // public string GetCertificateNumber() 19 | // { 20 | // Cert certificate = LoadCertificate(); 21 | // return GetCertificateNumber(certificate); 22 | // } 23 | // private string GetCertificateNumber(Cert certificate) 24 | // { 25 | // string hexadecimalString = certificate.SerialNumber; 26 | // StringBuilder sb = new StringBuilder(); 27 | // for (int i = 0; i <= hexadecimalString.Length - 2; i += 2) 28 | // { 29 | // sb.Append(Convert.ToString(Convert.ToChar(Int32.Parse(hexadecimalString.Substring(i, 2), System.Globalization.NumberStyles.HexNumber)))); 30 | // } 31 | // return sb.ToString(); 32 | // } 33 | // public string GetCertificateName() 34 | // { 35 | // Cert certificate = LoadCertificate(); 36 | // return GetCertificateName(certificate); 37 | // } 38 | // private string GetCertificateName(Cert certificate) 39 | // { 40 | // string nameCertificate = ""; 41 | // string[] subjects = certificate.SubjectDN.Trim().Split(','); 42 | // for (int i = 0; i < subjects.Length; i++) 43 | // { 44 | // string[] strConceptoTemp = subjects[i].Split('='); 45 | // if (strConceptoTemp[0].Trim() == "OID.2.5.4.41") 46 | // { 47 | // nameCertificate = strConceptoTemp[1].Trim().Split('/')[0]; 48 | // //Bug Fix replace " 49 | // nameCertificate = nameCertificate.Replace("\"", ""); 50 | // break; 51 | // } 52 | // } 53 | // return nameCertificate; 54 | // } 55 | // public string GetCertificateTaxId() 56 | // { 57 | // Cert certificate = LoadCertificate(); 58 | // return GetCertificateTaxId(certificate); 59 | // } 60 | // private string GetCertificateTaxId(Cert certificate) 61 | // { 62 | // string taxIdCertificate = ""; 63 | // string[] subjects = certificate.SubjectDN.Trim().Split(','); 64 | // for (int i = 0; i < subjects.Length; i++) 65 | // { 66 | // string[] strConceptoTemp = subjects[i].Split('='); 67 | // if (strConceptoTemp[0].Trim() == "OID.2.5.4.45") 68 | // { 69 | // taxIdCertificate = strConceptoTemp[1].Trim().Split('/')[0]; 70 | // taxIdCertificate = taxIdCertificate.Replace("\"", ""); 71 | // break; 72 | // } 73 | // } 74 | // return taxIdCertificate.Trim().ToUpper(); 75 | // } 76 | // public string GetCertificateValidFrom() 77 | // { 78 | // Cert certificate = LoadCertificate(); 79 | // return GetCertificateValidFrom(certificate); 80 | // } 81 | // private string GetCertificateValidFrom(Cert certificate) 82 | // { 83 | // return 84 | // certificate.ValidFromStr; 85 | // } 86 | // public string GetCertificateValidTo() 87 | // { 88 | // Cert certificate = LoadCertificate(); 89 | // return GetCertificateValidTo(certificate); 90 | // } 91 | // public string GetCertificateValidTo(Cert certificate) 92 | // { 93 | // return 94 | // certificate.ValidToStr; 95 | // } 96 | // public bool IsCSD() 97 | // { 98 | // Cert certificate = LoadCertificate(); 99 | // return IsCSD(certificate); 100 | // } 101 | // private bool IsCSD(Cert certificate) 102 | // { 103 | // try 104 | // { 105 | // var subjects = certificate.SubjectDN.Split(','); 106 | // return subjects.Any(w => w.Trim().StartsWith("OU=")); 107 | // } 108 | // catch 109 | // { 110 | // return false; 111 | // } 112 | // } 113 | // public bool IsFiel() 114 | // { 115 | // Cert certificate = LoadCertificate(); 116 | // return IsFiel(certificate); 117 | // } 118 | // private bool IsFiel(Cert certificate) 119 | // { 120 | // try 121 | // { 122 | // var subjects = certificate.SubjectDN.Split(','); 123 | // return subjects.Any(w => !w.Trim().StartsWith("OU=")); 124 | // } 125 | // catch 126 | // { 127 | // return false; 128 | // } 129 | // } 130 | // public bool IsValidKeyPair() 131 | // { 132 | // var publicKey = this.certificateBytes; 133 | // var privateKey = this.keyBytes; 134 | 135 | // if (publicKey == null) 136 | // throw new ArgumentException("publicKey is empty"); 137 | // if (privateKey == null) 138 | // throw new ArgumentException("privateKey is empty"); 139 | // if (string.IsNullOrEmpty(this.password)) 140 | // throw new ArgumentException("password is empty"); 141 | 142 | // Cert cert = LoadCertificate(); 143 | // CertChain certChain = cert.GetCertChain(); 144 | 145 | // PrivateKey privKey = new PrivateKey(); 146 | // var success = privKey.LoadPkcs8Encrypted(privateKey, this.password); 147 | // if (!success) 148 | // throw new Exception("Private Key is not valid." + privKey.LastErrorText); 149 | // var modulusPrivateKey = GetModulusFromPublicKey(privKey.GetPublicKey()); 150 | // var modulusPublicKey = GetModulusFromPublicKey(cert.ExportPublicKey()); 151 | // return (modulusPrivateKey.Equals(modulusPublicKey)); 152 | // } 153 | // private Cert LoadCertificate() 154 | // { 155 | // Cert certificate = new Cert(); 156 | // var successLoad = certificate.LoadFromBinary(this.certificateBytes); 157 | // if (!successLoad) throw new Exception($"Invalid Certificate.{certificate.LastErrorText}"); 158 | // return certificate; 159 | // } 160 | // private string GetModulusFromPublicKey(PublicKey publicKey) 161 | // { 162 | // Xml xml = new Xml(); 163 | // xml.LoadXml(publicKey.GetXml()); 164 | // string modulus = xml.GetChildContent("Modulus"); 165 | // // To convert to hex: 166 | // BinData binDat = new BinData(); 167 | // binDat.Clear(); 168 | // binDat.AppendEncoded(modulus, "base64"); 169 | // return binDat.GetEncoded("hex"); 170 | // } 171 | // } 172 | //} 173 | -------------------------------------------------------------------------------- /Common/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace Fiscalapi.Credentials.Common 5 | { 6 | public static class StringExtensions 7 | { 8 | /// 9 | /// Encode string to base64 10 | /// 11 | /// string to encode 12 | /// base64 encoded string 13 | public static string EncodeToBase64(this string plainText) 14 | { 15 | var plainTextBytes = Encoding.UTF8.GetBytes(plainText); 16 | return Convert.ToBase64String(plainTextBytes); 17 | } 18 | 19 | /// 20 | /// Decode string to plainText 21 | /// 22 | /// base64 encoded data to decode 23 | /// plainText 24 | public static string DecodeFromBase64(this string base64EncodedData) 25 | { 26 | var base64EncodedBytes = Convert.FromBase64String(base64EncodedData); 27 | return Encoding.UTF8.GetString(base64EncodedBytes); 28 | } 29 | 30 | /// 31 | /// Get array bytes from any string 32 | /// 33 | /// 34 | /// array bytes 35 | public static byte[] GetBytes(this string plainText) 36 | { 37 | return Encoding.UTF8.GetBytes(plainText); 38 | } 39 | 40 | 41 | /// 42 | /// Converts an array of bytes to base64 encode 43 | /// 44 | /// 45 | /// base64String 46 | public static string ToBase64String(this byte[] inArray) 47 | { 48 | return Convert.ToBase64String(inArray); 49 | } 50 | 51 | /// 52 | /// Get an array of bytes of base64 encoded text 53 | /// 54 | /// 55 | /// 56 | public static byte[] FromBase64String(this string base64EncodedText) 57 | { 58 | return Convert.FromBase64String(base64EncodedText); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Common/Utf8StringWriter.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text; 3 | 4 | namespace Fiscalapi.Credentials.Common 5 | { 6 | public class Utf8StringWriter : StringWriter 7 | { 8 | public override Encoding Encoding 9 | { 10 | get { return Encoding.UTF8; } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Core/Certificate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Cryptography; 5 | using System.Security.Cryptography.X509Certificates; 6 | using System.Text; 7 | using Fiscalapi.Credentials.Common; 8 | 9 | namespace Fiscalapi.Credentials.Core 10 | { 11 | /// 12 | /// Represents a wrapper for FIEL and CSD certificate. 13 | /// 14 | public sealed class Certificate : ICertificate 15 | { 16 | private readonly X509Certificate2 _x509Certificate2; 17 | 18 | 19 | public Certificate(string plainBase64) 20 | { 21 | PlainBase64 = plainBase64; 22 | _x509Certificate2 = new X509Certificate2(CertificatePlainBytes); 23 | } 24 | 25 | /// 26 | /// The result of reading the bytes from the .cer file and converting them to base64 27 | /// 28 | public string PlainBase64 { get; } 29 | 30 | 31 | /// 32 | /// The equivalent of reading the bytes from the .cer file and converting them to base64 33 | /// 34 | public byte[] CertificatePlainBytes 35 | { 36 | get => Convert.FromBase64String(PlainBase64); 37 | } 38 | 39 | 40 | /// 41 | /// RFC as parsed from subject/x500UniqueIdentifier 42 | /// see https://oidref.com/2.5.4.45 43 | /// 44 | public string Rfc 45 | { 46 | get => SubjectKeyValuePairs.FirstOrDefault(x => x.Key.Equals("OID.2.5.4.45")).Value[..13].Trim(); 47 | } 48 | 49 | 50 | /// 51 | /// Organization = 'razón social' 52 | /// 53 | public string Organization 54 | { 55 | // CN: CommonName 56 | // OU: OrganizationalUnit 57 | // O: Organization 58 | // L: Locality 59 | // S: StateOrProvinceName 60 | // C: CountryName 61 | get => ExistsKey(SubjectKeyValuePairs, "O") 62 | ? SubjectKeyValuePairs.FirstOrDefault(x => x.Key.Equals("O")).Value.Trim() 63 | : string.Empty; 64 | } 65 | 66 | /// 67 | /// OrganizationalUnit = 'Sucursal' 68 | /// As of 2019-08-01 is known that only CSD have OU (Organization Unit) 69 | /// 70 | public string OrganizationalUnit 71 | { 72 | // CN: CommonName 73 | // OU: OrganizationalUnit 74 | // O: Organization 75 | // L: Locality 76 | // S: StateOrProvinceName 77 | // C: CountryName 78 | 79 | get => ExistsKey(SubjectKeyValuePairs, "OU") 80 | ? SubjectKeyValuePairs.FirstOrDefault(x => x.Key.Equals("OU")).Value.Trim() 81 | : string.Empty; 82 | } 83 | 84 | private static bool ExistsKey(IEnumerable> keyValuePairs, string key) 85 | { 86 | return keyValuePairs.Any(pair => pair.Key.Equals(key)); 87 | } 88 | 89 | 90 | /// 91 | /// All serial number 92 | /// 93 | public string SerialNumber 94 | { 95 | get => _x509Certificate2.SerialNumber; 96 | } 97 | 98 | /// 99 | /// Certificate number as Mexican tax authority (SAT) require. 100 | /// 101 | public string CertificateNumber 102 | { 103 | get => Encoding.ASCII.GetString(_x509Certificate2.GetSerialNumber().Reverse().ToArray()); 104 | } 105 | 106 | 107 | /// 108 | /// Issuer data parsed into KeyValuePair collection 109 | /// 110 | public List> IssuerKeyValuePairs 111 | { 112 | get => _x509Certificate2.Issuer.Split(',') 113 | .Select(x => new KeyValuePair(x.Split('=')[0].Trim(), x.Split('=')[1].Trim())).ToList(); 114 | } 115 | 116 | /// 117 | /// Raw X509Certificate2 Issuer property 118 | /// 119 | public string Issuer 120 | { 121 | get => _x509Certificate2.Issuer; 122 | } 123 | 124 | 125 | /// 126 | /// Subject data parsed into KeyValuePair collection 127 | /// see https://oidref.com/2.5.4.45 128 | /// 129 | public List> SubjectKeyValuePairs 130 | { 131 | get => _x509Certificate2.Subject.Split(',') 132 | .Select(x => new KeyValuePair(x.Split('=')[0].Trim(), x.Split('=')[1].Trim())).ToList(); 133 | } 134 | 135 | /// 136 | /// Raw X509Certificate2 Subject property 137 | /// see https://oidref.com/2.5.4.45 138 | /// 139 | public string Subject 140 | { 141 | get => _x509Certificate2.Subject; 142 | } 143 | 144 | 145 | /// 146 | /// Certificate version 147 | /// 148 | public int Version 149 | { 150 | get => _x509Certificate2.Version; 151 | } 152 | 153 | /// 154 | /// Valid start date 155 | /// 156 | public DateTime ValidFrom 157 | { 158 | get => _x509Certificate2.NotBefore; 159 | } 160 | 161 | /// 162 | /// Valid end date 163 | /// 164 | public DateTime ValidTo 165 | { 166 | get => _x509Certificate2.NotAfter; 167 | } 168 | 169 | /// 170 | /// True if ValidTo date is less than the current date 171 | /// 172 | public bool IsValid() 173 | { 174 | return ValidTo > DateTime.Now; 175 | } 176 | 177 | /// 178 | /// True when is a FIEL certificate 179 | /// 180 | public bool IsFiel() 181 | { 182 | return string.IsNullOrEmpty(OrganizationalUnit); 183 | } 184 | 185 | 186 | /// 187 | /// Raw Data Length 188 | /// 189 | public int RawDataLength 190 | { 191 | get => _x509Certificate2.RawData.Length; 192 | } 193 | 194 | /// 195 | /// RawDataBytes 196 | /// 197 | public byte[] RawDataBytes 198 | { 199 | get => _x509Certificate2.RawData; 200 | } 201 | 202 | /// 203 | /// Convert X.509 DER base64 or X.509 DER to X.509 PEM 204 | /// 205 | /// 206 | public string GetPemRepresentation() 207 | { 208 | var certPem = new string(PemEncoding.Write(Flags.PemCertificate, _x509Certificate2.RawData)); 209 | 210 | return certPem; 211 | } 212 | } 213 | } -------------------------------------------------------------------------------- /Core/Credential.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Security.Cryptography; 4 | using System.Security.Cryptography.X509Certificates; 5 | using System.Text; 6 | using System.Xml; 7 | using System.Xml.Xsl; 8 | using Fiscalapi.Credentials.Common; 9 | 10 | namespace Fiscalapi.Credentials.Core; 11 | 12 | /// 13 | /// Represents a wrapper for certificate and private key. Something like 'FIEL and CSD' 14 | /// 15 | public class Credential : ICredential 16 | { 17 | //certificate and private key into X509Certificate2 object 18 | private readonly X509Certificate2 certificateWithPrivateKey; 19 | 20 | 21 | public Credential(ICertificate certificate, IPrivateKey privateKey) 22 | { 23 | Certificate = certificate; 24 | PrivateKey = privateKey; 25 | PasswordPhrase = privateKey.PasswordPhrase; 26 | 27 | PemCertificate = certificate.GetPemRepresentation(); 28 | PemPrivateKey = privateKey.GetPemRepresentation(); 29 | 30 | certificateWithPrivateKey = X509Certificate2.CreateFromPem(PemCertificate, PemPrivateKey); 31 | } 32 | 33 | /// 34 | /// Private key password 35 | /// 36 | public string PasswordPhrase { get; } 37 | 38 | /// 39 | /// Dotnetcfdi certificate wrapper 40 | /// 41 | public ICertificate Certificate { get; } 42 | 43 | /// 44 | /// Dotnetcfdi PrivateKey wrapper 45 | /// 46 | public IPrivateKey PrivateKey { get; } 47 | 48 | 49 | public string PemCertificate { get; } 50 | 51 | public string PemPrivateKey { get; } 52 | 53 | public byte[] CreatePFX() 54 | { 55 | var pfxBytes = certificateWithPrivateKey.Export(X509ContentType.Pfx, PasswordPhrase); 56 | 57 | return pfxBytes; 58 | } 59 | 60 | private string GetCertificatePemRepresentation() 61 | { 62 | return Certificate.GetPemRepresentation(); 63 | } 64 | 65 | private string GetPrivateKeyPemRepresentation() 66 | { 67 | return PrivateKey.GetPemRepresentation(); 68 | } 69 | 70 | /// 71 | /// Sign some data 72 | /// 73 | /// string to be signed 74 | /// signed bytes 75 | /// see CredentialSettings class to see signature parameters 76 | public byte[] SignData(string toSign) 77 | { 78 | //Sing and get signed bytes array 79 | var signedBytes = PrivateKey.SignData(toSign); 80 | 81 | return signedBytes; 82 | } 83 | 84 | /// 85 | /// Verify the signature of some data 86 | /// 87 | /// original data in bytes 88 | /// signed data in bytes 89 | /// True when the signature is valid, otherwise false 90 | public bool VerifyData(byte[] dataToVerify, byte[] signedData) 91 | { 92 | var isValid = PrivateKey.VerifyData(dataToVerify, signedData); 93 | 94 | return isValid; 95 | } 96 | 97 | 98 | /// 99 | /// True if Certificate.ValidTo date is less than the current date 100 | /// 101 | public bool IsValid() 102 | { 103 | return Certificate.IsValid(); 104 | } 105 | 106 | /// 107 | /// True when is a FIEL certificate 108 | /// 109 | public bool IsFiel() 110 | { 111 | return Certificate.IsFiel(); 112 | } 113 | 114 | /// 115 | /// True when certificate.ValidTo date is less than the current date and is a FIEL certificate 116 | /// 117 | /// 118 | public bool IsValidFiel() 119 | { 120 | return IsFiel() && IsValid(); 121 | } 122 | 123 | /// 124 | /// Fiel whe credential.certificate is a FIEL certificate otherwise csd 125 | /// 126 | public CredentialType CredentialType 127 | { 128 | get => Certificate.IsFiel() ? CredentialType.Fiel : CredentialType.Csd; 129 | } 130 | 131 | /// 132 | /// Convert the input string to a byte array and compute the hash. 133 | /// 134 | /// data to hashing 135 | /// encoded b64 hash 136 | public string CreateHash(string input) 137 | { 138 | var inputBytes = Encoding.UTF8.GetBytes(input); 139 | 140 | var hashBytes = CredentialSettings.HashAlgorithm.ComputeHash(inputBytes); 141 | 142 | var encodedBytes = hashBytes.ToBase64String(); 143 | 144 | return encodedBytes; 145 | } 146 | 147 | 148 | /// 149 | /// Verify a hash against a string. 150 | /// 151 | /// data to hashing 152 | /// encoded b64 hash 153 | /// true when computed hash is same of input hash otherwise false 154 | public bool VerifyHash(string input, string hash) 155 | { 156 | // Hash the input. 157 | var hashOfInput = CreateHash(input); 158 | 159 | // Create a StringComparer an compare the hashes. 160 | var comparer = StringComparer.OrdinalIgnoreCase; 161 | 162 | return comparer.Compare(hashOfInput, hash) == 0; 163 | } 164 | 165 | 166 | /// 167 | /// Transform XML documents into Pipe character in accordance with the schemes established in Mexican legislation. 168 | /// 169 | /// Xml file as string 170 | /// cadena original 171 | public string GetOriginalStringByXmlString(string xmlAsString) 172 | { 173 | if (string.IsNullOrEmpty(CredentialSettings.OriginalStringPath)) 174 | throw new ArgumentNullException(nameof(CredentialSettings.OriginalStringPath), 175 | "The path to cadenaoriginal.xslt file cannot be null or empty."); 176 | 177 | 178 | if (string.IsNullOrEmpty(xmlAsString)) 179 | throw new ArgumentNullException(nameof(xmlAsString), 180 | "The xml to calculate the original string cannot be null or empty."); 181 | 182 | using var stringReader = new StringReader(xmlAsString); 183 | using var xmlReader = XmlReader.Create(stringReader); 184 | using var stringWriter = new Utf8StringWriter(); 185 | 186 | var xsltSettings = new XsltSettings 187 | { 188 | EnableDocumentFunction = true, 189 | EnableScript = true 190 | }; 191 | var resolver = new XmlUrlResolver(); 192 | var transformer = new XslCompiledTransform(); 193 | 194 | transformer.Load(CredentialSettings.OriginalStringPath, xsltSettings, resolver); 195 | transformer.Transform(xmlReader, null, stringWriter); 196 | return stringWriter.ToString(); 197 | } 198 | 199 | /// 200 | /// Configure the Signature algorithm to do invoicing, using the donetcfdi/invoicing library. 201 | /// The default value is HashAlgorithmName.SHA1 (used for downloading xml), call ConfigureAlgorithmForInvoicing() methost to set HashAlgorithmName.SHA256 when you need to sign invoices. 202 | /// 203 | public void ConfigureAlgorithmForInvoicing() 204 | { 205 | CredentialSettings.SignatureAlgorithm = HashAlgorithmName.SHA256; 206 | } 207 | 208 | /// 209 | /// Configure the Signature algorithm to do xml-downloader, using the donetcfdi/xml-downloader library. 210 | /// The default value is HashAlgorithmName.SHA1 (used for downloading xml), call ConfigureAlgorithmForXmlDownloader() method to set HashAlgorithmName.SHA1 when you need to download xml. 211 | /// 212 | public void ConfigureAlgorithmForXmlDownloader() 213 | { 214 | CredentialSettings.SignatureAlgorithm = HashAlgorithmName.SHA1; 215 | } 216 | } -------------------------------------------------------------------------------- /Core/ICertificate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Fiscalapi.Credentials.Core; 5 | 6 | public interface ICertificate 7 | { 8 | /// 9 | /// The result of reading the bytes from the .cer file and converting them to base64 10 | /// 11 | string PlainBase64 { get; } 12 | 13 | /// 14 | /// The equivalent of reading the bytes from the .cer file and converting them to base64 15 | /// 16 | byte[] CertificatePlainBytes { get; } 17 | 18 | /// 19 | /// RFC as parsed from subject/x500UniqueIdentifier 20 | /// see https://oidref.com/2.5.4.45 21 | /// 22 | string Rfc { get; } 23 | 24 | /// 25 | /// Organization = 'razón social' 26 | /// 27 | string Organization 28 | { 29 | // CN: CommonName 30 | // OU: OrganizationalUnit 31 | // O: Organization 32 | // L: Locality 33 | // S: StateOrProvinceName 34 | // C: CountryName 35 | get; 36 | } 37 | 38 | /// 39 | /// OrganizationalUnit = 'Sucursal' 40 | /// As of 2019-08-01 is known that only CSD have OU (Organization Unit) 41 | /// 42 | string OrganizationalUnit 43 | { 44 | // CN: CommonName 45 | // OU: OrganizationalUnit 46 | // O: Organization 47 | // L: Locality 48 | // S: StateOrProvinceName 49 | // C: CountryName 50 | 51 | get; 52 | } 53 | 54 | /// 55 | /// All serial number 56 | /// 57 | string SerialNumber { get; } 58 | 59 | /// 60 | /// Certificate number as Mexican tax authority (SAT) require. 61 | /// 62 | string CertificateNumber { get; } 63 | 64 | /// 65 | /// Issuer data parsed into KeyValuePair collection 66 | /// 67 | List> IssuerKeyValuePairs { get; } 68 | 69 | /// 70 | /// Raw X509Certificate2 Issuer property 71 | /// 72 | string Issuer { get; } 73 | 74 | /// 75 | /// Subject data parsed into KeyValuePair collection 76 | /// see https://oidref.com/2.5.4.45 77 | /// 78 | List> SubjectKeyValuePairs { get; } 79 | 80 | /// 81 | /// Raw X509Certificate2 Subject property 82 | /// see https://oidref.com/2.5.4.45 83 | /// 84 | string Subject { get; } 85 | 86 | /// 87 | /// Certificate version 88 | /// 89 | int Version { get; } 90 | 91 | /// 92 | /// Valid start date 93 | /// 94 | DateTime ValidFrom { get; } 95 | 96 | /// 97 | /// Valid end date 98 | /// 99 | DateTime ValidTo { get; } 100 | 101 | /// 102 | /// Raw Data Length 103 | /// 104 | int RawDataLength { get; } 105 | 106 | /// 107 | /// RawDataBytes 108 | /// 109 | byte[] RawDataBytes { get; } 110 | 111 | /// 112 | /// True if ValidTo date is less than the current date 113 | /// 114 | bool IsValid(); 115 | 116 | /// 117 | /// True when is a FIEL certificate 118 | /// 119 | bool IsFiel(); 120 | 121 | /// 122 | /// Convert X.509 DER base64 or X.509 DER to X.509 PEM 123 | /// 124 | /// 125 | string GetPemRepresentation(); 126 | } -------------------------------------------------------------------------------- /Core/ICredential.cs: -------------------------------------------------------------------------------- 1 | using Fiscalapi.Credentials.Common; 2 | 3 | namespace Fiscalapi.Credentials.Core; 4 | 5 | public interface ICredential 6 | { 7 | /// 8 | /// Private key password 9 | /// 10 | string PasswordPhrase { get; } 11 | 12 | /// 13 | /// Dotnetcfdi certificate wrapper 14 | /// 15 | ICertificate Certificate { get; } 16 | 17 | /// 18 | /// Dotnetcfdi PrivateKey wrapper 19 | /// 20 | IPrivateKey PrivateKey { get; } 21 | 22 | string PemCertificate { get; } 23 | string PemPrivateKey { get; } 24 | 25 | /// 26 | /// Fiel whe credential.certificate is a FIEL certificate otherwise csd 27 | /// 28 | CredentialType CredentialType { get; } 29 | 30 | byte[] CreatePFX(); 31 | 32 | /// 33 | /// Sign some data 34 | /// 35 | /// string to be signed 36 | /// signed bytes 37 | /// see CredentialSettings class to see signature parameters 38 | byte[] SignData(string toSign); 39 | 40 | /// 41 | /// Verify the signature of some data 42 | /// 43 | /// original data in bytes 44 | /// signed data in bytes 45 | /// True when the signature is valid, otherwise false 46 | bool VerifyData(byte[] dataToVerify, byte[] signedData); 47 | 48 | /// 49 | /// True if Certificate.ValidTo date is less than the current date 50 | /// 51 | bool IsValid(); 52 | 53 | /// 54 | /// True when is a FIEL certificate 55 | /// 56 | bool IsFiel(); 57 | 58 | /// 59 | /// True when certificate.ValidTo date is less than the current date and is a FIEL certificate 60 | /// 61 | /// 62 | bool IsValidFiel(); 63 | 64 | /// 65 | /// Convert the input string to a byte array and compute the hash. 66 | /// 67 | /// data to hashing 68 | /// encoded b64 hash 69 | string CreateHash(string input); 70 | 71 | /// 72 | /// Verify a hash against a string. 73 | /// 74 | /// data to hashing 75 | /// encoded b64 hash 76 | /// true when computed hash is same of input hash otherwise false 77 | bool VerifyHash(string input, string hash); 78 | 79 | 80 | /// 81 | /// Transform XML documents into Pipe character in accordance with the schemes established in Mexican legislation. 82 | /// 83 | /// Xml file as string 84 | /// cadena original 85 | public string GetOriginalStringByXmlString(string xmlAsString); 86 | 87 | 88 | /// 89 | /// Configure the Signature algorithm to do invoicing, using the donetcfdi/invoicing library. 90 | /// The default value is HashAlgorithmName.SHA1 (used for downloading xml), call ConfigureAlgorithmForInvoicing() methost to set HashAlgorithmName.SHA256 when you need to sign invoices. 91 | /// 92 | public void ConfigureAlgorithmForInvoicing(); 93 | 94 | /// 95 | /// Configure the Signature algorithm to do xml-downloader, using the donetcfdi/xml-downloader library. 96 | /// The default value is HashAlgorithmName.SHA1 (used for downloading xml), call ConfigureAlgorithmForXmlDownloader() method to set HashAlgorithmName.SHA1 when you need to download xml. 97 | /// 98 | public void ConfigureAlgorithmForXmlDownloader(); 99 | } -------------------------------------------------------------------------------- /Core/IPrivateKey.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Cryptography; 2 | 3 | namespace Fiscalapi.Credentials.Core; 4 | 5 | /// 6 | /// Represents a wrapper for FIEL and CSD private key. 7 | /// 8 | public interface IPrivateKey 9 | { 10 | /// 11 | /// File .key encoded in base64 12 | /// 13 | string Base64 { get; } 14 | 15 | /// 16 | /// Private key password 17 | /// 18 | string PasswordPhrase { get; } 19 | 20 | /// 21 | /// Private key RSA object 22 | /// 23 | RSA RsaPrivateKey { get; } 24 | 25 | /// 26 | /// File .key in bytes 27 | /// 28 | byte[] PrivateKeyBytes { get; } 29 | 30 | /// 31 | /// Private key password converted to bytes 32 | /// 33 | byte[] PasswordPhraseBytes { get; } 34 | 35 | /// 36 | /// Convert PKCS#8 DER private key to PKCS#8 PEM 37 | /// 38 | /// 39 | string GetPemRepresentation(); 40 | 41 | /// 42 | /// Sign some data 43 | /// 44 | /// string to be signed 45 | /// signed bytes 46 | /// see CredentialSettings class 47 | byte[] SignData(string toSign); 48 | 49 | /// 50 | /// Verify the signature of some data 51 | /// 52 | /// original data in bytes 53 | /// signed data in bytes 54 | /// True when the signature is valid, otherwise false 55 | bool VerifyData(byte[] dataToVerify, byte[] signedData); 56 | } -------------------------------------------------------------------------------- /Core/PrivateKey.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography; 3 | using System.Text; 4 | using Fiscalapi.Credentials.Common; 5 | 6 | namespace Fiscalapi.Credentials.Core; 7 | 8 | /// 9 | /// Represents a wrapper for FIEL and CSD private key. 10 | /// 11 | public class PrivateKey : IPrivateKey 12 | { 13 | public PrivateKey(string fileInbase64, string passwordPhrase) 14 | { 15 | PasswordPhrase = passwordPhrase; 16 | Base64 = fileInbase64; 17 | RsaPrivateKey = RSA.Create(); 18 | RsaPrivateKey.ImportEncryptedPkcs8PrivateKey(PasswordPhraseBytes, PrivateKeyBytes, out _); 19 | } 20 | 21 | /// 22 | /// File .key encoded in base64 23 | /// 24 | public string Base64 { get; } 25 | 26 | /// 27 | /// Private key password 28 | /// 29 | public string PasswordPhrase { get; } 30 | 31 | /// 32 | /// Private key RSA object 33 | /// 34 | public RSA RsaPrivateKey { get; } 35 | 36 | /// 37 | /// File .key in bytes 38 | /// 39 | public byte[] PrivateKeyBytes 40 | { 41 | get => Convert.FromBase64String(Base64); 42 | } 43 | 44 | /// 45 | /// Private key password converted to bytes 46 | /// 47 | public byte[] PasswordPhraseBytes 48 | { 49 | get => Encoding.ASCII.GetBytes(PasswordPhrase); 50 | } 51 | 52 | /// 53 | /// Convert PKCS#8 DER private key to PKCS#8 PEM 54 | /// 55 | /// 56 | public string GetPemRepresentation() 57 | { 58 | var keyPem = new string(PemEncoding.Write(Flags.PemPrivateKey, RsaPrivateKey.ExportPkcs8PrivateKey())); 59 | return keyPem; 60 | } 61 | 62 | /// 63 | /// Sign some data 64 | /// 65 | /// string to be signed 66 | /// signed bytes 67 | /// see CredentialSettings class 68 | public byte[] SignData(string toSign) 69 | { 70 | //get bytes array to sing 71 | var bytesToSign = toSign.GetBytes(); 72 | 73 | //Sing and get signed bytes array 74 | var signedBytes = RsaPrivateKey.SignData(bytesToSign, CredentialSettings.SignatureAlgorithm, CredentialSettings.SignaturePadding); 75 | 76 | //Converts signed bytes to base64 77 | return signedBytes; 78 | } 79 | 80 | /// 81 | /// Verify the signature of some data 82 | /// 83 | /// original data in bytes 84 | /// signed data in bytes 85 | /// True when the signature is valid, otherwise false 86 | public bool VerifyData(byte[] dataToVerify, byte[] signedData) 87 | { 88 | try 89 | { 90 | //Validation 91 | var isValid = RsaPrivateKey.VerifyData(dataToVerify, signedData, CredentialSettings.SignatureAlgorithm, 92 | CredentialSettings.SignaturePadding); 93 | 94 | 95 | return isValid; 96 | } 97 | catch (CryptographicException e) 98 | { 99 | Console.WriteLine(e.Message); 100 | return false; 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fiscalapi Credentials 2 | 3 | [![NuGet](https://img.shields.io/nuget/v/FiscalApi.svg)](https://www.nuget.org/packages/Fiscalapi.Credentials/) 4 | [![License](https://img.shields.io/github/license/FiscalAPI/fiscalapi-credentials-net)](https://github.com/FiscalAPI/fiscalapi-credentials-net/blob/main/LICENSE) 5 | 6 | Biblioteca para trabajar con archivos **CSD** y **FIEL** del SAT de manera sencilla en .NET. **`Credentials`** simplifica la firma (sellado), la verificación de firmas, el cálculo de hashes (por ejemplo, para servicios de descarga masiva de XML y metadatos), así como la obtención de información relevante de los certificados y llaves públicas del SAT. 7 | 8 | La firma digital es un proceso criptográfico que garantiza la autenticidad, integridad y no repudio de un documento o mensaje. En México, el SAT requiere que los contribuyentes utilicen un **Certificado de Sello Digital (CSD)** para firmar (sellar) las facturas, mientras que una **Firma Electrónica Avanzada (FIEL)** se utiliza para firmar documentos de cualquier otro tipo (contratos, acuerdos, cotizaciones, correos, etc) de manera legalmente válida. 9 | 10 | ## Tabla de Contenido 11 | 12 | 1. [Acerca de la Librería](#Características) 13 | 2. [Instalación](#Instalación) 14 | 3. [Uso Básico](#uso-básico) 15 | - [Certificado (`Certificate`)](#uso-del-certificado) 16 | - [Clave Privada (`PrivateKey`)](#uso-de-la-clave-privada) 17 | - [Credencial (`Credential`)](#uso-del-objeto-credential) 18 | 4. [Acerca de los Archivos CSD y FIEL](#acerca-de-los-archivos-de-certificado-y-llave-privada) 19 | 5. [Compatibilidad](#compatibilidad) 20 | 6. [Roadmap](#roadmap) 21 | 7. [Contribuciones](#contribuciones) 22 | 8. [🤝 Contribuir](#-contribuir) 23 | 9. [🐛 Reportar Problemas](#-reportar-problemas) 24 | 10. [📄 Licencia](#-licencia) 25 | 11. [🔗 Enlaces Útiles](#-enlaces-útiles) 26 | 27 | 28 | ## 🚀 Características 29 | 30 | - **Firmar (sellar) documentos**: Utilizar CSD o FIEL para generar firmas digitales que cumplen con los lineamientos del SAT. 31 | - **Verificar firmas**: Validar que la firma fue generada correctamente con la llave privada asociada. 32 | - **Calcular hashes**: Útil para servicios de descarga masiva de XML del SAT, comparaciones de integridad, etc. 33 | - **Obtener datos del certificado**: Número de serie, fecha de vigencia, RFC, razón social, entre otros. 34 | - **Generar archivos PFX (PKCS#12)** a partir de los archivos proporcionados por el SAT sin necesidad de `openssl`. 35 | 36 | ### Clases Principales 37 | 38 | 1. **`Certificate`** 39 | - Maneja todo lo relacionado al `.cer` (X.509 DER). 40 | - Obtiene número de certificado, versión, periodo de vigencia, etc. 41 | - Convierte de X.509 DER a X.509 PEM. 42 | 43 | 2. **`PrivateKey`** 44 | - Maneja todo lo relacionado al `.key` (PKCS#8 DER). 45 | - Convierte la clave de PKCS#8 DER a PKCS#8 PEM. 46 | - Requiere la contraseña de la llave privada para operar. 47 | 48 | 3. **`Credential`** 49 | - Une `Certificate` y `PrivateKey`. 50 | - Permite firmar, validar firmas, crear archivos PFX, etc. 51 | - Identifica si es CSD o FIEL y verifica su vigencia. 52 | 53 | ## 📦Instalación 54 | 55 | **NuGet Package Manager**: 56 | 57 | ```bash 58 | NuGet\Install-Package Fiscalapi.Credentials 59 | ``` 60 | 61 | **.NET CLI**: 62 | 63 | ```bash 64 | dotnet add package Fiscalapi.Credentials 65 | ``` 66 | 67 | ## Ejemplos de uso 68 | 69 | ### Uso del Certificado 70 | 71 | ```csharp 72 | // Cargar el archivo .cer 73 | var cerPath = @"C:\Users\Usuario\Desktop\cer.cer"; 74 | var cerBytes = File.ReadAllBytes(cerPath); 75 | var cerBase64 = Convert.ToBase64String(cerBytes); 76 | 77 | // Crear instancia de Certificate 78 | var certificate = new Certificate(cerBase64); 79 | // (Por ejemplo, cerBase64 puede guardarse en BD y luego recuperarse) 80 | 81 | // Mostrar información básica del certificado 82 | Console.WriteLine($"PlainBase64: {certificate.PlainBase64}"); 83 | Console.WriteLine($"RFC: {certificate.Rfc}"); 84 | Console.WriteLine($"Razón Social: {certificate.Organization}"); 85 | Console.WriteLine($"Serial Number: {certificate.SerialNumber}"); 86 | Console.WriteLine($"Certificate Number: {certificate.CertificateNumber}"); 87 | Console.WriteLine($"Válido desde: {certificate.ValidFrom}"); 88 | Console.WriteLine($"Válido hasta: {certificate.ValidTo}"); 89 | Console.WriteLine($"¿Es FIEL?: {certificate.IsFiel()}"); 90 | Console.WriteLine($"¿Está vigente?: {certificate.IsValid()}"); // ValidTo > DateTime.Now 91 | 92 | // Convertir X.509 DER base64 a X.509 PEM 93 | var pemCertificate = certificate.GetPemRepresentation(); 94 | File.WriteAllText("MyPemCertificate.pem", pemCertificate); 95 | ``` 96 | 97 | ### Uso de la Clave Privada 98 | 99 | ```csharp 100 | // Cargar el archivo .key 101 | var keyPath = @"C:\Users\Usuario\Desktop\key.key"; 102 | var keyBytes = File.ReadAllBytes(keyPath); 103 | var keyBase64 = Convert.ToBase64String(keyBytes); 104 | 105 | // Crear instancia de PrivateKey con la contraseña 106 | var privateKey = new PrivateKey(keyBase64, "TuPasswordDeLaLlave"); 107 | 108 | // Convertir PKCS#8 DER a PKCS#8 PEM 109 | var PemPrivateKey = privateKey.GetPemRepresentation(); 110 | File.WriteAllText("MyPemPrivateKey.pem", PemPrivateKey); 111 | ``` 112 | 113 | ### Uso del Objeto Credential 114 | 115 | ```csharp 116 | // Crear instancia de Credential a partir de certificate y privateKey 117 | var cred = new Credential(certificate, privateKey); 118 | 119 | var dataToSign = "Hola Mundo"; // Reemplazar con cadena original u otro contenido 120 | 121 | // Firmar datos 122 | var signedBytes = cred.SignData(dataToSign); 123 | 124 | // Verificar firma 125 | var originalDataBytes = Encoding.UTF8.GetBytes(dataToSign); 126 | var isValidSignature = cred.VerifyData(originalDataBytes, signedBytes); 127 | Console.WriteLine($"¿Firma Válida?: {isValidSignature}"); 128 | 129 | // Crear archivo PFX (PKCS#12) 130 | var pfxBytes = cred.CreatePFX(); 131 | File.WriteAllBytes("MyPFX.pfx", pfxBytes); 132 | 133 | // Calcular y verificar hash (por ejemplo, para descarga masiva XML) 134 | var dataToHash = "XML canonical representation"; 135 | var hashBase64 = cred.CreateHash(dataToHash); 136 | var isHashValid = cred.VerifyHash(dataToHash, hashBase64); 137 | Console.WriteLine($"¿Hash Válido?: {isHashValid}"); 138 | 139 | // Información adicional 140 | Console.WriteLine($"Tipo de Credencial: {cred.CredentialType}"); // Enum: Fiel || Csd 141 | Console.WriteLine($"¿Es FIEL válida?: {cred.IsValidFiel()}"); 142 | ``` 143 | 144 | 145 | ## Acerca de los Archivos de Certificado y Llave Privada 146 | 147 | Los certificados provistos por el SAT suelen estar en formato **X.509 DER** (`.cer`), mientras que las llaves privadas están en **PKCS#8 DER** (`.key`). Estos formatos **no** se pueden usar directamente en la mayoría de las bibliotecas de C#, pero **`Credentials`** resuelve este problema convirtiéndolos internamente a **PEM** (`.pem`) sin requerir `openssl`. 148 | 149 | Esta conversión consiste básicamente en: 150 | 151 | 1. Codificar en **Base64** el contenido DER. 152 | 2. Separar en líneas de 64 caracteres. 153 | 3. Agregar las cabeceras y pies específicos para certificados y llaves privadas. 154 | 155 | Por lo tanto, no necesitas realizar la conversión manual ni depender de utilerías externas para utilizar tus archivos **CSD** o **FIEL**. 156 | 157 | 158 | ## Compatibilidad 159 | 160 | - Compatible con **.NET 6**, **.NET 8** y **.NET 9** WinForms, WPF, Console, ASP.NET, Blazor, MVC, WebApi. 161 | - Mantenemos la compatibilidad con al menos la versión LTS más reciente de .NET. 162 | - Se sigue el [**Versionado Semántico 2.0.0**]([docs/SEMVER.md](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort)), por lo que puedes confiar en que las versiones nuevas no romperán tu aplicación de forma inesperada. 163 | ## Roadmap 164 | 165 | - [x] Conversión de **X.509 DER** a **X.509 PEM** (SAT .cer). 166 | - [x] Conversión de **PKCS#8 DER** a **PKCS#8 PEM** (SAT .key). 167 | - [x] Creación de archivo .PFX (PKCS#12) a partir de los archivos X.509 PEM y PKCS#8 PEM. 168 | - [x] Firma de datos con `SHA256withRSA`. 169 | - [x] Verificación de datos firmados. 170 | - [x] Cálculo y verificación de hash para servicios SAT de descarga masiva de XML. 171 | - [ ] Persistencia de CSD y FIEL utilizando Entity Framework Core y bases de datos relacionales. 172 | 173 | 174 | ## 🤝 Contribuir 175 | 176 | 1. Haz un fork del repositorio. 177 | 2. Crea una rama para tu feature: `git checkout -b feature/AmazingFeature`. 178 | 3. Realiza commits de tus cambios: `git commit -m 'Add some AmazingFeature'`. 179 | 4. Sube tu rama: `git push origin feature/AmazingFeature`. 180 | 5. Abre un Pull Request en GitHub. 181 | 182 | 183 | ## 🐛 Reportar Problemas 184 | 185 | 1. Asegúrate de usar la última versión del SDK. 186 | 2. Verifica si el problema ya fue reportado. 187 | 3. Proporciona un ejemplo mínimo reproducible. 188 | 4. Incluye los mensajes de error completos. 189 | 190 | 191 | ## 📄 Licencia 192 | 193 | Este proyecto está licenciado bajo la Licencia **MPL**. Consulta el archivo [LICENSE](LICENSE.txt) para más detalles. 194 | 195 | 196 | ## 🔗 Enlaces Útiles 197 | 198 | - [Documentación Oficial](https://docs.fiscalapi.com) 199 | - [Portal de FiscalAPI](https://fiscalapi.com) 200 | - [Facturar en WinForms/Console](https://github.com/FiscalAPI/fiscalapi-samples-net-winforms) 201 | - [Facturar en ASP.NET](https://github.com/FiscalAPI/fiscalapi-samples-net-aspnet) 202 | 203 | --- 204 | 205 | Desarrollado con ❤️ por [Fiscalapi](https://www.fiscalapi.com) 206 | -------------------------------------------------------------------------------- /bin/Debug/Credentials.4.0.95.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/Credentials.4.0.95.nupkg -------------------------------------------------------------------------------- /bin/Debug/Fiscalapi.Credentials.4.0.95.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/Fiscalapi.Credentials.4.0.95.nupkg -------------------------------------------------------------------------------- /bin/Debug/net6.0/Fiscalapi.Credentials.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v6.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v6.0": { 9 | "Fiscalapi.Credentials/4.0.95": { 10 | "runtime": { 11 | "Fiscalapi.Credentials.dll": {} 12 | } 13 | } 14 | } 15 | }, 16 | "libraries": { 17 | "Fiscalapi.Credentials/4.0.95": { 18 | "type": "project", 19 | "serviceable": false, 20 | "sha512": "" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /bin/Debug/net6.0/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/net6.0/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /bin/Debug/net6.0/Fiscalapi.Credentials.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/net6.0/Fiscalapi.Credentials.pdb -------------------------------------------------------------------------------- /bin/Debug/net8.0/Fiscalapi.Credentials.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "Fiscalapi.Credentials/4.0.95": { 10 | "runtime": { 11 | "Fiscalapi.Credentials.dll": {} 12 | } 13 | } 14 | } 15 | }, 16 | "libraries": { 17 | "Fiscalapi.Credentials/4.0.95": { 18 | "type": "project", 19 | "serviceable": false, 20 | "sha512": "" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /bin/Debug/net8.0/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/net8.0/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /bin/Debug/net8.0/Fiscalapi.Credentials.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/net8.0/Fiscalapi.Credentials.pdb -------------------------------------------------------------------------------- /bin/Debug/net9.0/Fiscalapi.Credentials.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v9.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v9.0": { 9 | "Fiscalapi.Credentials/4.0.95": { 10 | "runtime": { 11 | "Fiscalapi.Credentials.dll": {} 12 | } 13 | } 14 | } 15 | }, 16 | "libraries": { 17 | "Fiscalapi.Credentials/4.0.95": { 18 | "type": "project", 19 | "serviceable": false, 20 | "sha512": "" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /bin/Debug/net9.0/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/net9.0/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /bin/Debug/net9.0/Fiscalapi.Credentials.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/bin/Debug/net9.0/Fiscalapi.Credentials.pdb -------------------------------------------------------------------------------- /fiscalapi-credentials.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0;net8.0;net9.0 5 | 4.0.95 6 | $(Version) 7 | $(Version) 8 | $(Version) 9 | Fiscalapi.Credentials 10 | Fiscalapi.Credentials 11 | Fiscalapi.Credentials 12 | Fiscalapi 13 | fiscalapi.png 14 | Biblioteca .NET para el manejo de Certificados de Sello Digital (CSD) y Firma Electrónica Avanzada (FIEL/e.firma) del SAT. Simplifica operaciones criptográficas como firma digital (sellado), verificación de firmas, cálculo de hashes, y extracción de información de certificados. Perfecta para desarrolladores que necesitan integrar autenticación digital en sus aplicaciones de facturación electrónica o trámites gubernamentales en México. Compatible con los formatos originales del SAT sin necesidad de conversiones adicionales. 15 | sat csd fiel e-firma efirma sellos-digitales cfdi facturacion-electronica mexico certificados-digitales firma-digital cryptography cer key pkcs8 pkcs12 pfx dotnet 16 | Fiscalapi credentials 17 | Fiscalapi 18 | fiscalapi.ico 19 | True 20 | FISCAL API S DE R.L DE C.V 21 | FISCAL API S DE R.L DE C.V © 2019 22 | https://www.fiscalapi.com 23 | README.md 24 | https://github.com/FiscalAPI/fiscalapi-credentials-net 25 | git 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /fiscalapi-credentials.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.12.35514.174 d17.12 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fiscalapi-credentials", "fiscalapi-credentials.csproj", "{F1B9B06E-F9FD-4C21-9B91-A96E7B0F52B3}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F1B9B06E-F9FD-4C21-9B91-A96E7B0F52B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F1B9B06E-F9FD-4C21-9B91-A96E7B0F52B3}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F1B9B06E-F9FD-4C21-9B91-A96E7B0F52B3}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F1B9B06E-F9FD-4C21-9B91-A96E7B0F52B3}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /fiscalapi.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/fiscalapi.ico -------------------------------------------------------------------------------- /fiscalapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/fiscalapi.png -------------------------------------------------------------------------------- /obj/Debug/Credentials.4.0.95.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Credentials 5 | 4.0.95 6 | Fiscalapi credentials 7 | Fiscalapi 8 | fiscalapi.png 9 | README.md 10 | https://www.fiscalapi.com/ 11 | Package Description 12 | FISCAL API S DE R.L DE C.V © 2019 13 | csd fiel sellos cfdi .cer .Key pkcs8 pkcs12 pfx factura facturacion mexico sat 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /obj/Debug/Fiscalapi.Credentials.4.0.95.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Fiscalapi.Credentials 5 | 4.0.95 6 | Fiscalapi credentials 7 | Fiscalapi 8 | fiscalapi.png 9 | README.md 10 | https://www.fiscalapi.com/ 11 | Package Description 12 | FISCAL API S DE R.L DE C.V © 2019 13 | sat csd fiel e-firma efirma sellos-digitales cfdi facturacion-electronica mexico certificados-digitales firma-digital cryptography cer key pkcs8 pkcs12 pfx dotnet 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] 5 | -------------------------------------------------------------------------------- /obj/Debug/net6.0/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net6.0/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net6.0/Fiscalapi.Credentials.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net6.0/Fiscalapi.Credentials.pdb -------------------------------------------------------------------------------- /obj/Debug/net6.0/fiscalapi-credentials.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("FISCAL API S DE R.L DE C.V")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyCopyrightAttribute("FISCAL API S DE R.L DE C.V © 2019")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("4.0.95")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("4.0.95")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("Fiscalapi.Credentials")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("Fiscalapi.Credentials")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("4.0.95")] 22 | [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/FiscalAPI/fiscalapi-credentials-net")] 23 | 24 | // Generated by the MSBuild WriteCodeFragment class. 25 | 26 | -------------------------------------------------------------------------------- /obj/Debug/net6.0/fiscalapi-credentials.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 1321b93ecfe9584a99595926e923105b24e6503c47833889d33f299a8176d4e7 2 | -------------------------------------------------------------------------------- /obj/Debug/net6.0/fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net6.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = Fiscalapi.Credentials 11 | build_property.ProjectDir = C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\ 12 | build_property.EnableComHosting = 13 | build_property.EnableGeneratedComInterfaceComImportInterop = 14 | build_property.EffectiveAnalysisLevelStyle = 6.0 15 | build_property.EnableCodeStyleSeverity = 16 | -------------------------------------------------------------------------------- /obj/Debug/net6.0/fiscalapi-credentials.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net6.0/fiscalapi-credentials.assets.cache -------------------------------------------------------------------------------- /obj/Debug/net6.0/fiscalapi-credentials.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 8ceb21e99864c915d6b640c4bde37a7b37a68f8f678465eecf2653349353f0d9 2 | -------------------------------------------------------------------------------- /obj/Debug/net6.0/fiscalapi-credentials.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net6.0\Fiscalapi.Credentials.deps.json 2 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net6.0\Fiscalapi.Credentials.dll 3 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net6.0\Fiscalapi.Credentials.pdb 4 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig 5 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\fiscalapi-credentials.AssemblyInfoInputs.cache 6 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\fiscalapi-credentials.AssemblyInfo.cs 7 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\fiscalapi-credentials.csproj.CoreCompileInputs.cache 8 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\Fiscalapi.Credentials.dll 9 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\refint\Fiscalapi.Credentials.dll 10 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\Fiscalapi.Credentials.pdb 11 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net6.0\ref\Fiscalapi.Credentials.dll 12 | -------------------------------------------------------------------------------- /obj/Debug/net6.0/ref/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net6.0/ref/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net6.0/refint/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net6.0/refint/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] 5 | -------------------------------------------------------------------------------- /obj/Debug/net8.0/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net8.0/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net8.0/Fiscalapi.Credentials.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net8.0/Fiscalapi.Credentials.pdb -------------------------------------------------------------------------------- /obj/Debug/net8.0/fiscalapi-credentials.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("FISCAL API S DE R.L DE C.V")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyCopyrightAttribute("FISCAL API S DE R.L DE C.V © 2019")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("4.0.95")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("4.0.95")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("Fiscalapi.Credentials")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("Fiscalapi.Credentials")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("4.0.95")] 22 | [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/FiscalAPI/fiscalapi-credentials-net")] 23 | 24 | // Generated by the MSBuild WriteCodeFragment class. 25 | 26 | -------------------------------------------------------------------------------- /obj/Debug/net8.0/fiscalapi-credentials.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 1321b93ecfe9584a99595926e923105b24e6503c47833889d33f299a8176d4e7 2 | -------------------------------------------------------------------------------- /obj/Debug/net8.0/fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net8.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = Fiscalapi.Credentials 11 | build_property.ProjectDir = C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\ 12 | build_property.EnableComHosting = 13 | build_property.EnableGeneratedComInterfaceComImportInterop = 14 | build_property.EffectiveAnalysisLevelStyle = 8.0 15 | build_property.EnableCodeStyleSeverity = 16 | -------------------------------------------------------------------------------- /obj/Debug/net8.0/fiscalapi-credentials.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::System; 3 | global using global::System.Collections.Generic; 4 | global using global::System.IO; 5 | global using global::System.Linq; 6 | global using global::System.Net.Http; 7 | global using global::System.Threading; 8 | global using global::System.Threading.Tasks; 9 | -------------------------------------------------------------------------------- /obj/Debug/net8.0/fiscalapi-credentials.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net8.0/fiscalapi-credentials.assets.cache -------------------------------------------------------------------------------- /obj/Debug/net8.0/fiscalapi-credentials.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 2937e95dcc8c4f91200fa2ec63a81164c8be4dfa8df745b1a272eeecfe3e5dfa 2 | -------------------------------------------------------------------------------- /obj/Debug/net8.0/fiscalapi-credentials.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net8.0\Fiscalapi.Credentials.deps.json 2 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net8.0\Fiscalapi.Credentials.dll 3 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net8.0\Fiscalapi.Credentials.pdb 4 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig 5 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\fiscalapi-credentials.AssemblyInfoInputs.cache 6 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\fiscalapi-credentials.AssemblyInfo.cs 7 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\fiscalapi-credentials.csproj.CoreCompileInputs.cache 8 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\Fiscalapi.Credentials.dll 9 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\refint\Fiscalapi.Credentials.dll 10 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\Fiscalapi.Credentials.pdb 11 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net8.0\ref\Fiscalapi.Credentials.dll 12 | -------------------------------------------------------------------------------- /obj/Debug/net8.0/ref/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net8.0/ref/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net8.0/refint/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net8.0/refint/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] 5 | -------------------------------------------------------------------------------- /obj/Debug/net9.0/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net9.0/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net9.0/Fiscalapi.Credentials.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net9.0/Fiscalapi.Credentials.pdb -------------------------------------------------------------------------------- /obj/Debug/net9.0/fiscalapi-credentials.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("FISCAL API S DE R.L DE C.V")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyCopyrightAttribute("FISCAL API S DE R.L DE C.V © 2019")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("4.0.95")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("4.0.95")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("Fiscalapi.Credentials")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("Fiscalapi.Credentials")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("4.0.95")] 22 | [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/FiscalAPI/fiscalapi-credentials-net")] 23 | 24 | // Generated by the MSBuild WriteCodeFragment class. 25 | 26 | -------------------------------------------------------------------------------- /obj/Debug/net9.0/fiscalapi-credentials.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 1321b93ecfe9584a99595926e923105b24e6503c47833889d33f299a8176d4e7 2 | -------------------------------------------------------------------------------- /obj/Debug/net9.0/fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net9.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = Fiscalapi.Credentials 11 | build_property.ProjectDir = C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\ 12 | build_property.EnableComHosting = 13 | build_property.EnableGeneratedComInterfaceComImportInterop = 14 | build_property.EffectiveAnalysisLevelStyle = 9.0 15 | build_property.EnableCodeStyleSeverity = 16 | -------------------------------------------------------------------------------- /obj/Debug/net9.0/fiscalapi-credentials.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net9.0/fiscalapi-credentials.assets.cache -------------------------------------------------------------------------------- /obj/Debug/net9.0/fiscalapi-credentials.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 0c81c936d634123ec32cd22e88da1f4b177328b73d087f9a64455b8a7f00f145 2 | -------------------------------------------------------------------------------- /obj/Debug/net9.0/fiscalapi-credentials.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net9.0\Fiscalapi.Credentials.deps.json 2 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net9.0\Fiscalapi.Credentials.dll 3 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\bin\Debug\net9.0\Fiscalapi.Credentials.pdb 4 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\fiscalapi-credentials.GeneratedMSBuildEditorConfig.editorconfig 5 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\fiscalapi-credentials.AssemblyInfoInputs.cache 6 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\fiscalapi-credentials.AssemblyInfo.cs 7 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\fiscalapi-credentials.csproj.CoreCompileInputs.cache 8 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\Fiscalapi.Credentials.dll 9 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\refint\Fiscalapi.Credentials.dll 10 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\Fiscalapi.Credentials.pdb 11 | C:\Users\JesusMendoza\source\repos\fiscalapi-credentials\obj\Debug\net9.0\ref\Fiscalapi.Credentials.dll 12 | -------------------------------------------------------------------------------- /obj/Debug/net9.0/ref/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net9.0/ref/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/Debug/net9.0/refint/Fiscalapi.Credentials.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FiscalAPI/fiscalapi-credentials-net/ade51b14f7cd1d9794b8886597bb4c17d3f71a03/obj/Debug/net9.0/refint/Fiscalapi.Credentials.dll -------------------------------------------------------------------------------- /obj/fiscalapi-credentials.csproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\fiscalapi-credentials.csproj": {} 5 | }, 6 | "projects": { 7 | "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\fiscalapi-credentials.csproj": { 8 | "version": "4.0.95", 9 | "restore": { 10 | "projectUniqueName": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\fiscalapi-credentials.csproj", 11 | "projectName": "Fiscalapi.Credentials", 12 | "projectPath": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\fiscalapi-credentials.csproj", 13 | "packagesPath": "C:\\Users\\JesusMendoza\\.nuget\\packages\\", 14 | "outputPath": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\obj\\", 15 | "projectStyle": "PackageReference", 16 | "crossTargeting": true, 17 | "fallbackFolders": [ 18 | "C:\\Program Files\\DevExpress 23.2\\Components\\Offline Packages", 19 | "C:\\Program Files\\DevExpress 24.1\\Components\\Offline Packages", 20 | "C:\\Program Files\\DevExpress 24.2\\Components\\Offline Packages", 21 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" 22 | ], 23 | "configFilePaths": [ 24 | "C:\\Users\\JesusMendoza\\AppData\\Roaming\\NuGet\\NuGet.Config", 25 | "C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 23.2.config", 26 | "C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 24.1.config", 27 | "C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 24.2.config", 28 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", 29 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" 30 | ], 31 | "originalTargetFrameworks": [ 32 | "net6.0", 33 | "net8.0", 34 | "net9.0" 35 | ], 36 | "sources": { 37 | "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, 38 | "C:\\Program Files\\DevExpress 23.2\\Components\\System\\Components\\Packages": {}, 39 | "C:\\Program Files\\DevExpress 24.1\\Components\\System\\Components\\Packages": {}, 40 | "C:\\Program Files\\DevExpress 24.2\\Components\\System\\Components\\Packages": {}, 41 | "https://api.nuget.org/v3/index.json": {}, 42 | "https://nuget.devexpress.com/BW9WR4LPAUXqHLd3WlQmsJnjWiegyFotKlYwlpfQyNOHlbWilZ/api/v3/index.json": {} 43 | }, 44 | "frameworks": { 45 | "net6.0": { 46 | "targetAlias": "net6.0", 47 | "projectReferences": {} 48 | }, 49 | "net8.0": { 50 | "targetAlias": "net8.0", 51 | "projectReferences": {} 52 | }, 53 | "net9.0": { 54 | "targetAlias": "net9.0", 55 | "projectReferences": {} 56 | } 57 | }, 58 | "warningProperties": { 59 | "warnAsError": [ 60 | "NU1605" 61 | ] 62 | }, 63 | "restoreAuditProperties": { 64 | "enableAudit": "true", 65 | "auditLevel": "low", 66 | "auditMode": "all" 67 | }, 68 | "SdkAnalysisLevel": "9.0.100" 69 | }, 70 | "frameworks": { 71 | "net6.0": { 72 | "targetAlias": "net6.0", 73 | "imports": [ 74 | "net461", 75 | "net462", 76 | "net47", 77 | "net471", 78 | "net472", 79 | "net48", 80 | "net481" 81 | ], 82 | "assetTargetFallback": true, 83 | "warn": true, 84 | "frameworkReferences": { 85 | "Microsoft.NETCore.App": { 86 | "privateAssets": "all" 87 | } 88 | }, 89 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100\\RuntimeIdentifierGraph.json" 90 | }, 91 | "net8.0": { 92 | "targetAlias": "net8.0", 93 | "imports": [ 94 | "net461", 95 | "net462", 96 | "net47", 97 | "net471", 98 | "net472", 99 | "net48", 100 | "net481" 101 | ], 102 | "assetTargetFallback": true, 103 | "warn": true, 104 | "frameworkReferences": { 105 | "Microsoft.NETCore.App": { 106 | "privateAssets": "all" 107 | } 108 | }, 109 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" 110 | }, 111 | "net9.0": { 112 | "targetAlias": "net9.0", 113 | "imports": [ 114 | "net461", 115 | "net462", 116 | "net47", 117 | "net471", 118 | "net472", 119 | "net48", 120 | "net481" 121 | ], 122 | "assetTargetFallback": true, 123 | "warn": true, 124 | "frameworkReferences": { 125 | "Microsoft.NETCore.App": { 126 | "privateAssets": "all" 127 | } 128 | }, 129 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" 130 | } 131 | } 132 | } 133 | } 134 | } -------------------------------------------------------------------------------- /obj/fiscalapi-credentials.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\JesusMendoza\.nuget\packages\;C:\Program Files\DevExpress 23.2\Components\Offline Packages;C:\Program Files\DevExpress 24.1\Components\Offline Packages;C:\Program Files\DevExpress 24.2\Components\Offline Packages;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages 9 | PackageReference 10 | 6.12.1 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /obj/fiscalapi-credentials.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /obj/project.assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "targets": { 4 | "net6.0": {}, 5 | "net8.0": {}, 6 | "net9.0": {} 7 | }, 8 | "libraries": {}, 9 | "projectFileDependencyGroups": { 10 | "net6.0": [], 11 | "net8.0": [], 12 | "net9.0": [] 13 | }, 14 | "packageFolders": { 15 | "C:\\Users\\JesusMendoza\\.nuget\\packages\\": {}, 16 | "C:\\Program Files\\DevExpress 23.2\\Components\\Offline Packages": {}, 17 | "C:\\Program Files\\DevExpress 24.1\\Components\\Offline Packages": {}, 18 | "C:\\Program Files\\DevExpress 24.2\\Components\\Offline Packages": {}, 19 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} 20 | }, 21 | "project": { 22 | "version": "4.0.95", 23 | "restore": { 24 | "projectUniqueName": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\fiscalapi-credentials.csproj", 25 | "projectName": "Fiscalapi.Credentials", 26 | "projectPath": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\fiscalapi-credentials.csproj", 27 | "packagesPath": "C:\\Users\\JesusMendoza\\.nuget\\packages\\", 28 | "outputPath": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\obj\\", 29 | "projectStyle": "PackageReference", 30 | "crossTargeting": true, 31 | "fallbackFolders": [ 32 | "C:\\Program Files\\DevExpress 23.2\\Components\\Offline Packages", 33 | "C:\\Program Files\\DevExpress 24.1\\Components\\Offline Packages", 34 | "C:\\Program Files\\DevExpress 24.2\\Components\\Offline Packages", 35 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" 36 | ], 37 | "configFilePaths": [ 38 | "C:\\Users\\JesusMendoza\\AppData\\Roaming\\NuGet\\NuGet.Config", 39 | "C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 23.2.config", 40 | "C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 24.1.config", 41 | "C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 24.2.config", 42 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", 43 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" 44 | ], 45 | "originalTargetFrameworks": [ 46 | "net6.0", 47 | "net8.0", 48 | "net9.0" 49 | ], 50 | "sources": { 51 | "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, 52 | "C:\\Program Files\\DevExpress 23.2\\Components\\System\\Components\\Packages": {}, 53 | "C:\\Program Files\\DevExpress 24.1\\Components\\System\\Components\\Packages": {}, 54 | "C:\\Program Files\\DevExpress 24.2\\Components\\System\\Components\\Packages": {}, 55 | "https://api.nuget.org/v3/index.json": {}, 56 | "https://nuget.devexpress.com/BW9WR4LPAUXqHLd3WlQmsJnjWiegyFotKlYwlpfQyNOHlbWilZ/api/v3/index.json": {} 57 | }, 58 | "frameworks": { 59 | "net6.0": { 60 | "targetAlias": "net6.0", 61 | "projectReferences": {} 62 | }, 63 | "net8.0": { 64 | "targetAlias": "net8.0", 65 | "projectReferences": {} 66 | }, 67 | "net9.0": { 68 | "targetAlias": "net9.0", 69 | "projectReferences": {} 70 | } 71 | }, 72 | "warningProperties": { 73 | "warnAsError": [ 74 | "NU1605" 75 | ] 76 | }, 77 | "restoreAuditProperties": { 78 | "enableAudit": "true", 79 | "auditLevel": "low", 80 | "auditMode": "all" 81 | }, 82 | "SdkAnalysisLevel": "9.0.100" 83 | }, 84 | "frameworks": { 85 | "net6.0": { 86 | "targetAlias": "net6.0", 87 | "imports": [ 88 | "net461", 89 | "net462", 90 | "net47", 91 | "net471", 92 | "net472", 93 | "net48", 94 | "net481" 95 | ], 96 | "assetTargetFallback": true, 97 | "warn": true, 98 | "frameworkReferences": { 99 | "Microsoft.NETCore.App": { 100 | "privateAssets": "all" 101 | } 102 | }, 103 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100\\RuntimeIdentifierGraph.json" 104 | }, 105 | "net8.0": { 106 | "targetAlias": "net8.0", 107 | "imports": [ 108 | "net461", 109 | "net462", 110 | "net47", 111 | "net471", 112 | "net472", 113 | "net48", 114 | "net481" 115 | ], 116 | "assetTargetFallback": true, 117 | "warn": true, 118 | "frameworkReferences": { 119 | "Microsoft.NETCore.App": { 120 | "privateAssets": "all" 121 | } 122 | }, 123 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" 124 | }, 125 | "net9.0": { 126 | "targetAlias": "net9.0", 127 | "imports": [ 128 | "net461", 129 | "net462", 130 | "net47", 131 | "net471", 132 | "net472", 133 | "net48", 134 | "net481" 135 | ], 136 | "assetTargetFallback": true, 137 | "warn": true, 138 | "frameworkReferences": { 139 | "Microsoft.NETCore.App": { 140 | "privateAssets": "all" 141 | } 142 | }, 143 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" 144 | } 145 | } 146 | } 147 | } -------------------------------------------------------------------------------- /obj/project.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "dgSpecHash": "G60OVpSiWGQ=", 4 | "success": true, 5 | "projectFilePath": "C:\\Users\\JesusMendoza\\source\\repos\\fiscalapi-credentials\\fiscalapi-credentials.csproj", 6 | "expectedPackageFiles": [], 7 | "logs": [] 8 | } --------------------------------------------------------------------------------