PdfSignature constructor

PdfSignature(
  1. PdfDocument pdfDocument, {
  2. required PdfSignatureBase value,
  3. required Set<PdfSigFlags> flags,
  4. List<Uint8List>? crl,
  5. List<Uint8List>? cert,
  6. List<Uint8List>? ocsp,
})

Implementation

PdfSignature(
  PdfDocument pdfDocument, {
  required this.value,
  required this.flags,
  List<Uint8List>? crl,
  List<Uint8List>? cert,
  List<Uint8List>? ocsp,
}) : super(
        pdfDocument,
        params: PdfDict.values({
          '/Type': const PdfName('/Sig'),
        }),
      ) {
  if (crl != null) {
    for (final o in crl) {
      this.crl.add(PdfObjectStream(pdfDocument)..buf.putBytes(o));
    }
  }
  if (cert != null) {
    for (final o in cert) {
      this.cert.add(PdfObjectStream(pdfDocument)..buf.putBytes(o));
    }
  }
  if (ocsp != null) {
    for (final o in ocsp) {
      this.ocsp.add(PdfObjectStream(pdfDocument)..buf.putBytes(o));
    }
  }
}