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
Looks like these lines do nothing since buf is returned. Should return bufView? Which may also fix issues related to nodejs/node#46067 (see upstream issues linked to this issue and solutions) which was causing errors like below thrown for people using that implementation.
'importkey' on 'subtlecrypto': 2nd argument is not instance of arraybuffer, buffer, typedarray, or dataview.
Looks like these lines do nothing since
bufis returned. Should returnbufView? Which may also fix issues related to nodejs/node#46067 (see upstream issues linked to this issue and solutions) which was causing errors like below thrown for people using that implementation.Example code on this page also needs fixing as it copy/pastes the
stringToArrayBufferimplementation.https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey
Also see, where
bufViewis returned.https://stackoverflow.com/questions/34814480/how-to-load-a-public-key-in-pem-format-for-encryption