pkcs7 1.0.5 pkcs7: ^1.0.5 copied to clipboard
Pkcs7 message parser and verification library Can parse and generate x509 certificates, request Timestamp, build and verify an s-mime PKCS #7 message.
import 'package:pkcs7/pkcs7.dart';
Future<void> main() async {
const CA = '''
-----BEGIN CERTIFICATE-----
MIIDYDCCAkigAwIBAgIBYzANBgkqhkiG9w0BAQsFADBJMQswCQYDVQQGEwJDQTEQ
MA4GA1UECAwHT250YXJpbzEQMA4GA1UEBwwHVG9yb250bzEWMBQGA1UEAwwNZGFy
dC1wa2NzNyBDQTAeFw0yMjA5MTkxOTQzMjdaFw0yMzA5MTkxOTQzMjdaMEkxCzAJ
BgNVBAYTAkNBMRAwDgYDVQQIDAdPbnRhcmlvMRAwDgYDVQQHDAdUb3JvbnRvMRYw
FAYDVQQDDA1kYXJ0LXBrY3M3IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEAqvUaPvEWaiA5icirk1hu51JHbUnWw+tuDdJvTx8QA18KQIc15bIrTFFm
8hkMASkcYQEq0GKvWvHP4mIPpuEhAe218AhvKEl8avwkrMjc0pfCPgnGJHxgxiw5
W/7GmBDs70C4DuwsjCvi+1ZI8+SeG4HdPVTYDQte9QDtUgk+SlBQEt947L4K/DF3
igK+6O7jC5sRwPVWGTBDE/rHc1pPZ7eKQ/NnlPLkmqEtI+cUlGgLTvvwf2Sk1RXb
zy7SElPxsuyoIek+RevIobS9ZsVZGwtHub59HKwNvY7v25TDnM7lbXQr2cf3qdTm
NbBGGPXfHJeM/ewFcL4A++ZhEFtvswIDAQABo1MwUTAdBgNVHQ4EFgQUFQZxmQZ2
jb7mwD+OFFFiix6nulIwHwYDVR0jBBgwFoAUFQZxmQZ2jb7mwD+OFFFiix6nulIw
DwYDVR0TBAgwBgEB/wIBAzANBgkqhkiG9w0BAQsFAAOCAQEANe/5rU+djHqSVL6G
2Ixs9gmY2wJJX47jHqIywYM8p+IOXLN5J4bseJzUC/MOq4UCV+rugAY/2U6kOqdD
a8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