z-hao-wang / react-native-rsa

React native rsa crypto
MIT License
68 stars 19 forks source link

Pass the padding option. #10

Open Sachin678 opened 7 years ago

Sachin678 commented 7 years ago

I am encrypting a key on frontend using a public key and passing it to node.js server where node is decrypting it using RSA algorithm with PADDING 4. So when I pass my encypted key node server consider it as invalid key because it is not encrypted with padding.

Please let me know how can we do this using react-native-rsa module.

z-hao-wang commented 7 years ago

Hi, I think the padding option is hard coded in the lib. I have to check and get back to you. You can either fork it change the default padding or add an option to allow passing in padding type.

Hao Wang

On Oct 16, 2017, at 1:13 AM, Sachin678 notifications@github.com wrote:

I am encrypting a key on frontend using a public key and passing it to node.js server where node is decrypting it using RSA algorithm with PADDING 4. So when I pass my encypted key node server consider it as invalid key because it is not encrypted with padding.

Please let me know how can we do this using react-native-rsa module.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.