Skip to content
mofosyne edited this page Aug 31, 2017 · 2 revisions

Convert from cbor hex to diagnostic notation:

echo '8402011a386ffe2802' | xxd -r -p | cbor2diag.rb

Output:

[2, 1, 946863656, 2]

Convert from cbor hex to pretty cbor notation:

echo '8402011a386ffe2802' | xxd -r -p | cbor2pretty.rb

Output:

84             # array(4)
   02          # unsigned(2)
   01          # unsigned(1)
   1a 386ffe28 # unsigned(946863656)
   02          # unsigned(2)