Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Kotlinx Serialization: CBOR deserialization without deserialization strategy?

I would like to deserialize a generic cbor object using kotlinx-serialization, including tags etc., without knowing much about its structure. Basically an equivalent to a JsonObject, but for Cbor. Is ...
acheloil's user avatar
0 votes
0 answers
19 views

Custom serializer for Jackson with togglebale options

I have a rather complicated Class structure that is needed to be serialized into CBOR. Now issue is that sometimes i need CBOR with tags while other times i need without tags. Id like to be able to ...
Marko Taht's user avatar
  • 1,524
1 vote
1 answer
72 views

What options should I pass to node-cbor to decode WebAuthN passkey authenticatorData?

To decode the AuthenticatorAttestationResponse: attestationObject property returned when attestationType: 'direct' is passed to .create(), this works: const {decodeAllSync} = require("cbor");...
Doug Reeder's user avatar
0 votes
0 answers
31 views

Usage of CBOR tag 27 (major type 6)

As per specification supplied with the tag registration, one supposed to use a string as type identifier. However, the specification seems to allow a great degree of freedom wrt how to use the tag. ...
Nikita Kalinichenko's user avatar
0 votes
1 answer
147 views

Converting a valid cbor string to cbor bytes

how do i convert a valid cbor that is in string to bytes? cbor = "b'\xa1bip\x186'" Using bytes or the usual stuff isnt working e.g .encode('utf-8') I want to be able to use loads on the data ...
Robert 's user avatar
0 votes
1 answer
114 views

cbor.js decodes BYTES to associative object instead of Array/TypedArray

I have a CBOR payload containing a MAP with a BYTES field: // simplified testcase: var data = [0xBF, 0x63, 0x72, 0x61, 0x77, 0x58, 0x10, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0xFF, ...
fferri's user avatar
  • 18.9k
1 vote
0 answers
82 views

Avoid extra allocations while encoding data as CBOR, using kotlinx.serialization

When using kotlinx.serialization and encoding data as JSON, it's possible to write serialized data directly into an OutputStream, via Json.encodeToStream(SerializationStrategy<T>, T, ...
Bass's user avatar
  • 5,268
0 votes
0 answers
62 views

How to use lenient mode with FasterXML CBOR?

I want to use the CBORGenerator.Feature.LENIENT_UTF_ENCODING enum that was introduced in version 2.12 of the jackson-dataformats-binary library. I am using version 2.16.0 of the library. I thought I ...
Shane Bishop's user avatar
  • 4,680
0 votes
0 answers
150 views

How can I decode CBOR-encoded data that uses CBOR byte strings in Java?

I am sending CBOR-encoded data from one application to another. The application receiving the CBOR-encoded data is a Java application. The CBOR-encoded data was encoded with strings as byte strings, i....
Shane Bishop's user avatar
  • 4,680
0 votes
1 answer
867 views

CBOR decode the attestationObject

I'm trying to implement webauthn and getting tripped up at the CBOR decoding part. The webauthn method returns a byte array which has to be CBOR decoded to get a json object. Since I have to send this ...
Whip's user avatar
  • 2,220
1 vote
0 answers
171 views

RawCborDecodeError when saving metadata in Cardano using Blockfrost Api

I am trying to save metadata on Cardano using Blockfrost API, but I keep getting 400 error: { "error": "Bad Request", "message": '"transaction ...
mev's user avatar
  • 177
-1 votes
1 answer
143 views

How to decode cbor encoded hex string using perl libraries?

I have a cbor encoded hex string. when decoding using CBOR::XS But I am getting an error as garbage after CBOR object, at offset 2 (octet 0x41) at new.pl line 6. use CBOR::XS; # Replace this with your ...
sasaki's user avatar
  • 23
1 vote
1 answer
552 views

CBOR serialization and deserialization on different platforms

I write a client-server application where the server is a Linux machine, and the client is a Windows machine. I serialize data using CBOR before sending them over a network. I serialized data on the ...
user680891's user avatar
1 vote
2 answers
779 views

How can the public key created by webauthn be decoded?

I have created a key pair using a webauthn playground, and the public key it generates is: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA12_SHooAcAenEEhUaGH7woTdHC7sFYx9AjDbZWE3a6DakqFUFF6F7-AT-...
failedprofundity's user avatar
1 vote
0 answers
156 views

libcbor and nested structure

I have a JSON nested structure like this: {"var1":"val1","var2":{"var1a":"val1a"}} I have generated the cbor buffer using this function from the ...
doxdici's user avatar
  • 47
0 votes
1 answer
434 views

Python cbor2 encode float in preferred (efficient) format

The CBOR docs state that the most efficient (less number of bytes) encoding should be preferred. floats can be encoded as 64-bit floats, or with extensions as 32-bit, 16-bit, BigFloat or DecimalFloat ...
user19007114's user avatar
0 votes
0 answers
95 views

SenML parser for C# .net

I am looking for a viable solution to parse SenML data into JSON using C#.NET. Preferably the following types - application/senml+json application/senml+cbor I have seen packages in Python namely - ...
Parikshit Bhagawati's user avatar
0 votes
1 answer
2k views

Question about JSON vs CBOR serialization

I have a theorical doubt about how serialization works, and especially about the difference between serialization schemes like JSON and binary serialization schemes like CBOR. My question is: if a ...
marco890's user avatar
0 votes
1 answer
70 views

Nested maps in Qt's QCborStreamWriter?

My program provides a large amount of data, organized in nested maps, that I would like to serialize and write in a file. Originally, I used a QJsonDocument with QJsonMap's and QJsonArray's, but the ...
Sylvain B.'s user avatar
-1 votes
1 answer
983 views

decode hex encoded cbor string as a string in javascript

I have this hex encoded cbor string that I need decoded as a string: ...
WaerWaters's user avatar
0 votes
1 answer
129 views

How CBOR Parse Task in Standard mode works?

I wonder how cborparse in mode="standard" works cause I can't make it work. Resources Chainlink CBOR Parse Task - docs Chainlink CBOR Prase Task - implementation Chainlink CBOR Parse Task - ...
vnavascues's user avatar
1 vote
0 answers
279 views

Opensearch: Insert documents (Fast) with CBOR and Bulking

I have to insert a lot of documents as fast as possible to an Opensearch Server (2.1.0) from a python client. I am already using the Bulking API and considering using the CBOR format instead of plain ...
the_dude's user avatar
0 votes
0 answers
70 views

Unambiguity of CBOR Diagnostic Notation: RFC8610, Appendix G.3

RFC 8610, appendix G.3 states the following: Where a byte string is to carry an embedded CBOR-encoded item, or more generally a sequence of zero or more such items, the diagnostic notation for these ...
Marc Ilunga's user avatar
1 vote
1 answer
275 views

cbor encoding dictionary with int key(s) turn to string key(s) on the server side

# client side code: import {encode, decode} from "cbor-js" const data = {1: 1, 2: 2, 3: :3} const encoding = encode(data) after sending the encoded data into the server (python) and ...
Nadav's user avatar
  • 2,717
-1 votes
1 answer
146 views

The CBOR library for Delphi is returning a different answer than Nodejs

We are decoding a QR code and receive an unexpected (incorrect) answer from the Delphi library. the Nodejs is the expected response. Delphi result at map position 192 text converted to Ascii 101,110,...
user941089's user avatar
0 votes
0 answers
2k views

Elasticsearch indexing error - field [data] not present as part of path [data]

I get this error: field [data] not present as part of path [data] when I attempt to ingest an attachment encoded in CBOR, in ElasticSearch 7.16. Using the ingest-attachment plugin. Files are large, so ...
Cogicero's user avatar
  • 1,524
2 votes
1 answer
3k views

cbor2 encoding bytes using Python

I'm decoding bytes using cbor2 library but I want to reverse the process to encoding This is my code import cbor2 cbor_data_decoded = cbor2.loads(b'\xd2\x84M\xa2\x01&\x04H\x0e\x1b)\x96VcIV\xa0Y\...
Arko's user avatar
  • 21
1 vote
1 answer
362 views

Implementing Typed Arrays with cbor2

Is it possible to implement Typed Arrays using the cbor2 Python library? In the documentation I only saw that you can define a custom encoder to serialize custom objects, but instead I would like to ...
marco890's user avatar
1 vote
0 answers
169 views

Exception in thread "main" java.lang.NoClassDefFoundError: com/upokecenter/cbor/CBORObject

I'm trying to decode a QR code and I'm getting this runtime error while running this line Message a = Encrypt0Message.DecodeFromBytes(outputStream.toByteArray());: Exception in thread "main" ...
Alessandro Caruso's user avatar
0 votes
0 answers
400 views

Base45 encoding

I recently have taken up interest in qr codes and first learned of base45 encoding and CBOR. I have a code snippet below, what I am wondering is if there is a way to actually reverse so that you could ...
dbzx10299's user avatar
  • 1,044
5 votes
1 answer
1k views

From base64-encoded public key in DER format to COSE key, in Python

I have a base64-encoded public key in DER format. In Python, how can I convert it into a COSE key? Here is my failed attempt: from base64 import b64decode from cose.keys import CoseKey pubkeyder = &...
Bob's user avatar
  • 1,733
1 vote
1 answer
759 views

Decoding covid TESTING certificate in Python - invalid base45 string

Thank you for your help. With the following sample script, I can successfully decode a (a) covid VACCINATION bar code and pass on the json to my application (I've tested this with the bar codes in my &...
awensch's user avatar
  • 11
0 votes
1 answer
2k views

CBOR encoding issue on format of keys

On javascript (not using node), I am facing different results when CBOR encoding using library (https://github.com/paroga/cbor-js) and when using CBOR online (https://cbor.me/). Note that even using a ...
Alex's user avatar
  • 135
-1 votes
1 answer
686 views

C++ jsoncons : cbor to json

I would like to convert cbor into json using the C++ jsoncons library (https://github.com/danielaparker/jsoncons/blob/master/doc/ref/cbor/cbor.md). But when I print the result to console some entries ...
Knöt's user avatar
  • 23
1 vote
0 answers
233 views

How to add a cbor.tag to a cose signature in cose-js

Does anyone with experience with cose-js know how to add a cbor tag to a cose signature? More specifically the tag "18" indicating that it is cose-sign1. I am studying COSE for my computer ...
Julius Goddard's user avatar
1 vote
1 answer
372 views

NameError: name 'cbor' is not defined

I used cbor_payload = cbor.dumps(cert_payload) This leads to the NameError: name 'cbor' is not defined message. (cbor was already installed via pip install before.) Any hints?
U F's user avatar
  • 21
0 votes
2 answers
2k views

How to encode CBOR from the decoding buffer

Buffer is not returning the same when decoding then encoding then decoding of CBOR. const greenpassData = cbor.decodeAllSync(cbor_data); // -------------------------------- //Want the CBOR data after ...
Shahryar Rafique's user avatar
1 vote
1 answer
954 views

How to deserialize/serialize struct as array without keys

How can I de/serialize struct without keys ? Since i will not be changing the order of fields, Indexes can act as keys which will reduce the size of payload. I'm working with serde_json and ciborium ...
LightSith's user avatar
  • 917
2 votes
2 answers
1k views

Error trying to verify signature on CBOR message

I'm having problems decoding EU Digital Certificate ("Covid pass") using COSE-JAVA. Public key appears to load ok but when I try to validate the CBOR message, I get following error: COSE....
nighthawk's user avatar
  • 822
0 votes
1 answer
87 views

library cbor introduces a new value in the conversion

I made on node.js, this program, which has an anomaly. When I do decodeAllSync I get a vector of decimal numbers which has one fewer numbers than I get by reconverting the vector with encodeAsync. Why ...
Antilope's user avatar
  • 445
0 votes
0 answers
199 views

CBOR encoding for a Double gives me wrong Output

I am using the CBORTree Library from Google right now, I am trying to encode a Double like this: val cborData = CborObject.createFromJavaObject(129.33) val cborBytes = cborData.toCborByteArray() My ...
Yasin Eraslan's user avatar
1 vote
0 answers
329 views

Getting the right CBOR output

I have a little code snippet, where I try to serialize a map, kind of a JSON object into a CBOR ByteArray. But I can not get the same output as in the CBOR playground cbor.me The thing I want to ...
Yasin Eraslan's user avatar
3 votes
1 answer
3k views

Verify EU GreenPass with openSSL

I just received my Covid Green Pass. I've started to decode it, here are the fields I get: header: a20448349a42b0c2d0728e0126 payload: ...
cdupont's user avatar
  • 1,188
1 vote
1 answer
316 views

Why there are difference while coding CBOR in Python libraries and RIOT OS C library?

So I have this thing {'apn': 'censored', 'support_data_mode': False, 'data_usr_name': 'censored', 'data_password': 'censored'} When read this data from system that uses NanoCBOR i get something like ...
Marcin Szymczyk's user avatar
1 vote
1 answer
884 views

Retrieving data from CBOR ByteArray

I am trying to serialize a map into CBOR in Kotlin with the Jackson CBOR Dataformats Library, this works fine if the key is a String , I can retrieve the value of that key easily but when the key in ...
Yasin Eraslan's user avatar
1 vote
1 answer
709 views

Verify COSE data (P-256)

I'm trying to verify the COSE data in the EU covid passports. Verification works using https://github.com/panzi/verify-ehc, but this uses python libraries and I want to do it in JS. Verification ...
Simon H's user avatar
  • 21k
1 vote
5 answers
5k views

Convert QR decoding solution from Python to C# (EU DGC)

I am trying to convert this Python code to C# (.NET Core ideally). Source My goal is to convert the QR input string to another string containing the data in json. See the provided links. #! /usr/bin/...
Adam Balcar's user avatar
3 votes
2 answers
11k views

Decode a base45 string that will lead to a cbor compressed file

Hi im trying to read my greenpass certificate, and i know that when you scan the QR code it will appear something like this HC1:NHFDFGDF......, i also know this is encoded as base45 so i made a little ...
Sh4dow's user avatar
  • 31
6 votes
1 answer
11k views

Webpack 5+Process is not defined triggered by stream-browserify

I have to decode a CBOR encoded array using the cbor node module. When i launch my command: const decodedData = base45.decode(greenpassBody); const output = pako.inflate(decodedData); const results = ...
Matteo Pietro Peru's user avatar
1 vote
0 answers
394 views

Example code for using CBOR in Angular Frontend

has anybody some example code about how to decode CBOR messages in an Angular Frontend? If I install 'cbor-web' via npm I get an exception during startup of the Angular Frontend: Uncaught ...
Dieter's user avatar
  • 95