Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use 'crypto.constants.RSA_PKCS1_OAEP_PADDING' #68

Open
ahadtechcarrot opened this issue May 13, 2022 · 2 comments
Open

Unable to use 'crypto.constants.RSA_PKCS1_OAEP_PADDING' #68

ahadtechcarrot opened this issue May 13, 2022 · 2 comments

Comments

@ahadtechcarrot
Copy link

ahadtechcarrot commented May 13, 2022

Hi,

I have setup the react-native-crypto library and everything is working fine, but I wanted to use crypto.constants.RSA_PKCS1_OAEP_PADDING in
const encryptedData = crypto.publicEncrypt( { key: publicKey, padding: crypto.constants.RSA_PKCS1_OAEP_PADDING, oaepHash: "sha256", }, Buffer.from(textData) );

which is not working and throwing exception and if I comment it out then it will generate a new encrypted value on every call. Can someone help me regarding this issue?

@umarrasheedmebest
Copy link

I'm getting the same error were you @ahadtechcarrot able to resolve this?

@ahadtechcarrot
Copy link
Author

No, I am using another library for RSA Encryption - react-native-simple-crypto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants