You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unknown message digest error is raised instead because the one-shot implementation just depends on the createSign API which is not meant to work with the one-shot sign algorithms like ed25519
Additional information
➜ jose git:(main) node
Welcome to Node.js v18.18.1.
Type ".help" for more information.
> const { privateKey } = require('crypto').generateKeyPairSync('ed25519')
undefined
> require('crypto').sign(undefined, Buffer.from('foo'), privateKey)
<Buffer 38 5b 58 fc ca eb b5 a5 43 6a 2a 5b c4 c8 ea 21 d4 96 42 27 61 47 33 a6 52 f7 a8 76 69 69 e3 c4 f4 76 44 35 00 f5 37 11 0b d9 89 e2 ab bd 3d ca 47 38 ... 14 more bytes>
>
The text was updated successfully, but these errors were encountered:
@panva can you suggest any workaround at all? Perhaps a pure-js library replacement for crypto.sign()
An unmaintained pure-js library serving as a polyfill here is the very reason why this problem exists. The only solution is that Bun implements these APIs properly.
They should IMHO not be used at all until then. The only trusted crypto interface in Bun for now remains the Web Crypto API implementation exposed on the global scope.
What version of Bun is running?
No response
What platform is your computer?
No response
What steps can reproduce the bug?
What is the expected behavior?
A buffer with the signature is returned.
What do you see instead?
Unknown message digest
error is raised instead because the one-shot implementation just depends on the createSign API which is not meant to work with the one-shot sign algorithms like ed25519Additional information
The text was updated successfully, but these errors were encountered: