Comments (2)
I'm just a user of this library, but FYI there's no strict dependency on node.js Buffer. You can just use native TextEncoder to convert to a Uint8Array. Or another library if you prefer.
An example:
let password = "foo", salt = "bar";
const keyPromise = scrypt.scrypt(
new TextEncoder().encode(password.normalize('NFKC')),
new TextEncoder().encode(salt.normalize('NFKC')),
N,
r,
p,
dkLen,
progressCallback
);
from scrypt-js.
Sorry for the long delay.
I've added TypeScript files and updated the README.
The Buffer dependency is only for the web demo, which could easily be removed in the future; I think I only use it for things which my strings library could handle, I just haven't had time to do it and it is fairly low priority, I think?
I'm going to close this now, but please feel free to re-open if you feel something wasn't addressed.
Thanks! :)
from scrypt-js.
Related Issues (16)
- README.md wrong parameter description HOT 2
- [Bug] Error when input password more than 64byte HOT 3
- Demo page only accepts 2 character long hex salts HOT 1
- Support Promise HOT 1
- node-scrypt don't support Node v12 HOT 4
- Providing a sync version HOT 3
- Add/Update Github Security Page/Policy HOT 1
- [Feature Request] Add Optional? WebAssembly Support HOT 7
- Demo doesn't accept hex salts longer than 2 nibbles HOT 4
- Hash the salt?
- Offline air-gapped usage
- How to use it in Esmodule mode? Buffer not exported
- Track code coverage of the unit tests by means of coverage and coveralls
- Integrate usage of a browser-testing library in order to track cross browser compatibility
- Evaluate usage of the WebCrypto API in order to speed up the computation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrypt-js.