-
Notifications
You must be signed in to change notification settings - Fork 26
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
Installation/usage? #59
Comments
<script src="src/promise.js"></script> <!-- Adds Promise to IE -->
<script src="src/webcrypto-liner.min.js"></script>
<script src="src/asmcrypto.js"></script> <!-- RSA/AES implementation -->
<script src="src/elliptic.js"></script> <!-- EC implementation --> You can use window.crypto.subtle.generateKey(alg, true, keyUsage);
// or
crypto.subtle.generateKey(alg, true, keyUsage); |
Is there a path to use import/require if I want to? If not, can you help me to understand what the use case is for npm installing if the src files need copy/moving into some dir to reference directly from HTML? Thanks for bearing with me on this :) |
|
For example, I'm also using https://github.com/samthor/fast-text-encoding to polypill TextEncoder on ie11/Edge. Usage of this is simple, I simply do a I'm trying to figure out if it's possible to have the same experience here... |
@microshine so you're saying all I need to do is |
Do you use any compiler for JS compilation? |
Yes, my project is built with EmberJS, which builds the app using Broccoli. commonjs modules are made available in my project using Yep, it's bundled and the |
The problem is that Can you try to update |
@microshine that seems to have worked - at least my app is no longer throwing an exception when trying to Let me check an environment where I was previously getting issues because crypto wasn't available... |
@lougreenwood I also expected to import the library in TypeScript like so: Right now this won't work with the following error: @microshine would it be possible for you to change |
@microshine @YuryStrozhevsky The issue pointed out by @mc-suchecki was a problem in my pull request to PKI.js. Please change the main field. |
Is it possible to use this as a simple es5/6 module and require/import for use in a particular class?
I get the impression that we need to run
npm install && npm run build
and then link to some generated js file directly in our html?I'm feeling quite lost at how to get this working, so any help is greatly appreciated :)
The text was updated successfully, but these errors were encountered: