GithubHelp home page GithubHelp logo

Comments (10)

kevlened avatar kevlened commented on June 5, 2024 1

Closing for now. If upgrading to SDK 39 doesn’t fix the issue, I’ll reopen it.

from isomorphic-webcrypto.

kevlened avatar kevlened commented on June 5, 2024

This seems unrelated to isomorphic-webcrypto. If you're using Expo, try upgrading to SDK 39, like this Expo user: expo/sentry-expo#110 (comment)

from isomorphic-webcrypto.

kaurrJaspreet avatar kaurrJaspreet commented on June 5, 2024

I am still not able to use it. Can you just elaborate that how can I use the importkey, generatekey and encryption/decryption in react native?
I am not able to use crypto.subtle.importKey
Please open this issue and give me the solution please.

I got error when I import crypto.
import crypto from 'isomorphic-webcrypto';
I have not imported any other dependency.
Please lemme know if there is any other requirement ti use the below given functions :
image

Thank You in advance!!

from isomorphic-webcrypto.

kevlened avatar kevlened commented on June 5, 2024

There shouldn't be any additional requirement. What is the error message?

from isomorphic-webcrypto.

kaurrJaspreet avatar kaurrJaspreet commented on June 5, 2024

Whenever I import crypto from "import crypto from 'isomorphic-webcrypto';", then I got below error
TypeError: global.document.addEventListener is not a function. (In 'global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false)', 'global.document.addEventListener' is undefined)
I am using react native 0.63

from isomorphic-webcrypto.

kaurrJaspreet avatar kaurrJaspreet commented on June 5, 2024

You can also share the link of any example of React native if there is any. I want to resolve it asap.

from isomorphic-webcrypto.

kevlened avatar kevlened commented on June 5, 2024

There are several example here: https://github.com/kevlened/webcrypto-react-native-examples

Are you using create-react-native-app?

from isomorphic-webcrypto.

kaurrJaspreet avatar kaurrJaspreet commented on June 5, 2024

Hi @kevlened
I am able to use crypto now. I am able to use importkey, generateKey functions but not wrapKey.
Can you share any example where wrapKey is used?

I checked your code, wrapkey function is defined there.Check below link :
https://github.com/kevlened/isomorphic-webcrypto/blob/master/src/react-native.js

I am getting below error :
image

Please help me in this.

My Code :
const wrappedKey = await crypto.subtle.wrapKey(
'raw',
sessionKey,
wrappingKey,
algorithm
);

from isomorphic-webcrypto.

arvinsim avatar arvinsim commented on June 5, 2024

I am also interested in this. I am porting my Web code that use window.crypto.subtle to react-native.

All of the functions except crypto.subtle.wrapKey seems to be present.

What is the analog to wrapKey here?

from isomorphic-webcrypto.

kevlened avatar kevlened commented on June 5, 2024

wrapKey should be the same, but it's only supported on certain algorithms. The react native implementation is Microsoft's pure js implementation with a few added tweaks. I haven't yet upgraded to their latest version, which may fix this issue.

I'll open a new issue for the upgrade. Feel free to open a new issue for your wrapKey issue.

from isomorphic-webcrypto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.