-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decode does not work for CBOR produced by Kotlin serializer #20
Comments
On 2023-11-09, at 03:58, denisenkom ***@***.***> wrote:
require 'cbor'
require 'base64'
CBOR.decode(Base64.urlsafe_decode64('v2dzdWNjZXNz9G5taXNzaW5nRmFjdG9yc5-fn2h3ZWJhdXRobr____-fn2d5dWJpb3Rwv_______'))
require 'cbor-pure'
require 'base64'
CBOR.decode(Base64.urlsafe_decode64('v2dzdWNjZXNz9G5taXNzaW5nRmFjdG9yc5-fn2h3ZWJhdXRobr____-fn2d5dWJpb3Rwv_______'))
=> {"success"=>false, "missingFactors"=>[[["webauthn", {}]], [["yubiotp", {}]]]}
Clearly, we have a bug here. Thank you for reporting.
Grüße, Carsten
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used Kotlin's
KotlinxSerializationCbor
to generate following CBOR, encoding it in base64 urlsafe format:I can decode it using
cbor2pretty.rb
tool with the following command:Here is the result:
This indicates to me that this is a valid CBOR and that probably Kotlin serializer is not at fault.
When I try to decode this CBOR using this library using code snippet:
I get error:
Is this library not supporting
map(*)
and/orarray(*)
elements? If this is the case, is it possible to add support for such elements?The text was updated successfully, but these errors were encountered: