dart_cose 1.1.3 copy "dart_cose: ^1.1.3" to clipboard
dart_cose: ^1.1.3 copied to clipboard

Partial Dart implementation of COSE, RFC8152. It is used to validate European Digital Green Certificates.

example/example.md

Example #

To use the library, you have to provide a COSE as binary data. Next, it will be decoded and validated against the DGC Spec.

As a result you will receive a CoseResult, which contains

  • a map which contains the payload
  • a bool verified, which indicates that the COSE signature could be verified
  • a CoseErrorCode errorCode, that indicates the type of error
// binary representation of the COSE structure
final List<int> cose = ...
// Map containing kid => Base64 encoded DER, or String PEM.
final Map<String, String> keys = ...

var result = Cose.decodeAndVerify(cose, keys);

print(result);

6
likes
90
pub points
61%
popularity

Publisher

verified publishericapps.com

Partial Dart implementation of COSE, RFC8152. It is used to validate European Digital Green Certificates.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

asn1lib, cbor, crypto, crypto_keys, dart_base45, ninja, x509b

More

Packages that depend on dart_cose