'How can I use publicEncrypt() in react native?

currently I need to use publicEncrpyt() Method to encrypt buffer with public key(pem file). but react native is not supporting 'crypto' library because It is not running on Node.js.

I checked 3rd party libraries but I wasn't able to find any method which is exactly same thing as publicEncrypt().

Here is publicEncrypt method doc

Does anyone have a same issue?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source