dart_cose 1.1.2 copy "dart_cose: ^1.1.2" to clipboard
dart_cose: ^1.1.2 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
110
points
39
downloads

Publisher

verified publishericapps.com

Weekly Downloads

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

Repository (GitHub)

Documentation

API reference

License

unknown (license)

Dependencies

cbor, crypto, crypto_keys, dart_base45, ninja, x509b

More

Packages that depend on dart_cose