cedarcode / cose-ruby

Ruby implementation of RFC 8152 CBOR Object Signing and Encryption (COSE)
https://rubygems.org/gems/cose
MIT License
15 stars 10 forks source link

create signing object with header #59

Closed hmontazeri closed 3 years ago

hmontazeri commented 3 years ago

Hi,

I'm completely new to cbor and cose. So sorry if I might be asking super noob questions.

I'm trying to create an cbor cose signing object in ruby to hash afterwards for our system partners. They are requesting an object like this:

[
  "Signature1",
  h'a10126',
  h'',
  h'>>CBOR PAYLOAD HEX<<'
]

I understand that CBOR has headers, so the h'' values are headers and not part of the actual payload. However, I can't find the correct way of creating this object using the cose-ruby library.

Is there anyone who can support with this?

Thanks in advance.