hwcrypto / hwcrypto.js

Browser JavaScript library for working with hardware tokens
https://hwcrypto.github.io
MIT License
157 stars 47 forks source link

Invalid hash #68

Open jchapelle opened 3 years ago

jchapelle commented 3 years ago

Hello,

I'd like to use hwcrypto to generate a signature and insert the signature and certificate in a pdf.

The data I'm trying to sign is an asn1 value hex encoded value 3169301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3231303732333038313833315a302f06092a864886f70d010904312204202c2c0a3e069410fb2f747d0225ec453e90f8c8c82847999e088baa589ca80a0b

When passing this data the hwcrypto, I get an invalid hash error. What format is excepted for the hash to sign ?

Cheers

metsma commented 3 years ago

This is data to be signed? It expects digest value probably of this data. Eg SHA-256