einvoicesign 1.0.1 copy "einvoicesign: ^1.0.1" to clipboard
einvoicesign: ^1.0.1 copied to clipboard

UBL 2.1 XML-DSig enveloped signer for Croatian eInvoices (eRačun, Fiscalization 2.0). Exclusive C14N, RSA-SHA256, PKCS#12, no OpenSSL. Byte-compatible with .NET SignedXml.

example/einvoicesign_example.dart

import 'dart:io';

import 'package:einvoicesign/einvoicesign.dart';

/// Signs a UBL 2.1 eInvoice with an enveloped XML-DSig signature.
///
/// The invoice must contain an empty
/// `ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/`
/// `sig:UBLDocumentSignatures/sac:SignatureInformation` element — the
/// signature is appended there.
void main(List<String> args) {
  final signedXml = signInvoiceXml(
    File('invoice.xml').readAsStringSync(),
    File('cert.p12').readAsBytesSync(),
    'password',
  );
  File('invoice_signed.xml').writeAsStringSync(signedXml);
}
0
likes
160
points
647
downloads

Documentation

API reference

Publisher

verified publisherfraktal.hr

Weekly Downloads

UBL 2.1 XML-DSig enveloped signer for Croatian eInvoices (eRačun, Fiscalization 2.0). Exclusive C14N, RSA-SHA256, PKCS#12, no OpenSSL. Byte-compatible with .NET SignedXml.

Repository (GitHub)
View/report issues

Topics

#xml-dsig #ubl #einvoice #digital-signature #fiscalization

License

MIT (license)

Dependencies

path, pkcs12_parser, pointycastle, xml

More

Packages that depend on einvoicesign