Skip to content
pubscout

pkcs7

1.0.6, released 2 years ago by nfet.net

Parse, generate, and verify PKCS#7 messages and X509 certificates

WASM-ready
$ flutter pub add pkcs7
Source repository

What it does

The pkcs7 package provides a simple API to parse and build PKCS#7 messages, generate X509 certificates, and verify signatures. It supports SM3 OID and can handle S‑mime messages.

AI-written summary of version 1.0.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to create or verify PKCS#7 or S‑mime messages in a Dart/Flutter app
  • You need to parse X509 certificates from PEM and work with their properties
  • You want a lightweight, cross‑platform crypto helper without external build steps

Skip it when

  • You require high‑performance or hardware‑accelerated cryptography
  • You need a full TLS/SSL stack or certificate authority management

Strengths

  • Cross‑platform support (Android, iOS, web, desktop)
  • Simple imperative API
  • SM3 OID support added in 1.0.6
  • No build_runner or codegen required

Weaknesses

  • Limited to PKCS#7/S‑mime only
  • No async or streaming API
  • Relies on pointycastle for crypto, which may be heavy for some use cases

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
final cert = X509.fromPem(CA);
print(cert.pem);
final pkcs7Builder = Pkcs7Builder();
pkcs7Builder.addCertificate(cert);
final signerInfo = Pkcs7SignerInfoBuilder.rsa(issuer: issuer, privateKey: privateKey);
signerInfo.addSMimeDigest(digest: hash);
final pkcs7 = pkcs7Builder.build();
print(pkcs7.pem);

Alternatives

Packages that do the same job and could replace pkcs7.

Works with

Packages commonly used together with pkcs7: ones it builds on, ones built on it, and its own family.