Im using .Net SDK in my C# Project to signing invoice B2C.
var cert = Encoding.UTF8.GetString(Convert.FromBase64String(deviceInfo.SecurityToken));
var res = new EInvoiceSigner().SignDocument(eInvoice, cert, deviceInfo.PrivateKey);
Im already generated Final CSID (/e-invoicing/simulation/production/csids**).**
When I validate the signed invoice by (ZATCA SDK) in ( Zatca ) I recive the below errors:
I need to know how solve these errors?
The screenshot is hard to read, so I’d suggest pasting the exact error codes as text. A common cause of hash and signature errors is the XML being changed after signing, for example by re-indenting it or normalizing line endings. Also check that the certificate passed to SignDocument is the decoded PEM exactly as returned for the CSID, and that the private key is the one generated with that CSR. Validate the signed file with the SDK exactly as it is written to disk, without re-serializing it in your code. If the errors persist, post the rule IDs from the validator output so people can narrow it down.