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

error: undefined is not a function when using crypto.sign #136

Open
informsharique opened this issue Dec 13, 2022 · 1 comment
Open

error: undefined is not a function when using crypto.sign #136

informsharique opened this issue Dec 13, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@informsharique
Copy link

So, I have set up the library as directed in the docs. and I'm using crypto.sign to sign some data. But it produces an error saying undefined is not a function pointing at sign function as you can see in the below image
Screenshot_1670922278

Below is the code I'm executing on press of a button

const operation = crypto.sign(
    'RSA-SHA256',
    someArrayBuffer,
    'key',
);
@ReiDuo
Copy link

ReiDuo commented May 3, 2023

I had this same issue, I had to reference Quickcrypto directly:

import {QuickCrypto} from "react-native-quick-crypto/src/QuickCrypto";

const sign = QuickCrypto.createSign("SHA256withRSA")
sign.write(dataToSign)
sign.end()

    actually signing does cause my app to crash, and at reload I get the error that Error: RNEncryptedStorage is undefined.

Let me know if this helped though, and whether this works for you

@Montchy Montchy added the bug Something isn't working label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants