amitaymolko / react-native-rsa-native

A native implementation of RSA key generation and encryption/decryption.
MIT License
232 stars 112 forks source link

Using RSA.signWithAlgorithm throws an error with some algorithms #131

Open pbclyde opened 2 years ago

pbclyde commented 2 years ago
const { private: privateKey, public: publicKey } = await RSA.generateKeys(2048)
const signature = await RSA.signWithAlgorithm('test', privateKey, 'SHA256withECDSA')

On an Android emulator SHA256withRSA works but I'd like to use SHA256withECDSA

When I do though, it immediately throws an error

signature initialized as EC (not EC)