jeroentrappers / dart_cose Goto Github PK
View Code? Open in Web Editor NEWPartial Dart implementation of COSE, RFC8152
License: Other
Partial Dart implementation of COSE, RFC8152
License: Other
Hi, may I request to add feature/function to extract the QR KID in the protectedHeader
from coseByte
in dart_cose?
final protectedHeader = items[_CBOR_DATA_PROTECTED_HEADER_INDEX];
var a = Cbor();
a.decodeFromList(coseByte);
List coseElement = a.getDecodedData().first;
final protectedHeader = coseElement[_CBOR_DATA_PROTECTED_HEADER_INDEX];
var b = Cbor();
b.decodeFromList(protectedHeader);
var kid = b.getDecodedData().first;
qrKid = base64Encode(kid[4]);
lib/dart_cose (exporting public files)
lib/src/* (contains all the files for this library)
Add a util function to extract the kid from a pem String
Knowing which KID was found in the COSE header is useful to identify which of the certificates was used, and thus the corresponding authority or additional information that the application could know about the KID (such as the country, which should match the country of the DGC, whether it was an NHS one or the eHealth one, whether it was revoked etc.).
In cases when the KID was not found in the Map of kid-to-certificates, it is useful to know what the KID in the header was too.
Refer to corresponding pull request which adds the coseKid
to the CoseResult
: #11
Hi Jeroen,
are test certificates also supported? I have troubles with reading test certificates. With qr codes from vaccinated people it works like a charm, but I am not able to read qr codes from tested people.
I get the following error code when reading a qr code from a tested person
CoseErrorCode (CoseErrorCode.key_not_found)
Thanks!
Alex
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.