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

KeyGen512 is not defined on browser #11

Open
sebmeister2077 opened this issue Sep 7, 2023 · 3 comments
Open

KeyGen512 is not defined on browser #11

sebmeister2077 opened this issue Sep 7, 2023 · 3 comments

Comments

@sebmeister2077
Copy link

I have a problem on the client side and can't seem to use the package. I am using Qwik and whenever i import the library i get this error

image

@sewest
Copy link

sewest commented Sep 8, 2023

I'm not familiar with Qwik, but to get this working in a Vite project I had to pop open node modules, cut out the portion of the code I needed (basically KeyGen768, Encrypt768 , etc., and the related helper functions). Then I had to add packages that were missing from the client side. Specifically, a package for SHA/SHAKE and a package for buffer. Also, I had to export each of the functions so that I could import them properly. As far as I can tell, this package seems to be designed to run in a server side node environment, so you'll have to adapt it.

It's hard to say what your specific issue is without any code, but hopefully this gives you some insight. If you can show me some code, I may be able to help more.

@sebmeister2077
Copy link
Author

sebmeister2077 commented Sep 9, 2023

Thank you for your reply. Sounds like a lot of trouble, but i found this new package that came out a few days ago and used it on my front end. https://www.npmjs.com/package/crystals-kyber-js

@sewest
Copy link

sewest commented Sep 9, 2023

Yes, it was a lot of work. Glad you found something that works for you and thanks for the link to the other package. Looks interesting.

@sebmeister2077 sebmeister2077 changed the title KeyGen512 is not defined KeyGen512 is not defined on browser Sep 9, 2023
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