mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-08 14:03:49 +00:00
91d5522630
Web Authentication's WD-05 specification moves to using (CBOR) Concise Binary Object Representation to transmit the binary data... most of it. This lands a subset of the Apache 2-licensed "CBOR C++" serialization library [1] into webauthn's path. It does not add any code to use this library; see patch 2/3. [1] https://github.com/naphaso/cbor-cpp/ MozReview-Commit-ID: Ktj9TgdqElk --HG-- extra : rebase_source : e36c956ef62be3ea1a3b6cbc8e3d6df2626c15b1
915 B
915 B
cbor-cpp
CBOR C++ serialization library
Just a simple SAX-like Concise Binary Object Representation (CBOR).
http://tools.ietf.org/html/rfc7049
Examples
cbor::output_dynamic output;
{ //encoding
cbor::encoder encoder(output);
encoder.write_array(5);
{
encoder.write_int(123);
encoder.write_string("bar");
encoder.write_int(321);
encoder.write_int(321);
encoder.write_string("foo");
}
}
{ // decoding
cbor::input input(output.data(), output.size());
cbor::listener_debug listener;
cbor::decoder decoder(input, listener);
decoder.run();
}