explodingcamera / subsonic-api

typescript/javascript library for interacting with subsonic-compatible apis
https://www.npmjs.com/package/subsonic-api
MIT License
13 stars 1 forks source link

Can you tell me how to switch node:crypto to crypto-js implementation? #6

Closed shanyan-wcx closed 3 months ago

shanyan-wcx commented 3 months ago

I want to port this API to ArkTs, but ArkTs cannot use node:crypto.

explodingcamera commented 3 months ago

In case you haven't fixed the issue, you can set globalThis.crypto to something implementing the webcrypto API (or just the getRandomValues method which is the only one used here).