hmalphettes / scrypt Goto Github PK
View Code? Open in Web Editor NEWThis project forked from wg/scrypt
Java implementation of scrypt
License: Apache License 2.0
This project forked from wg/scrypt
Java implementation of scrypt
License: Apache License 2.0
Java Implementation of scrypt A pure Java implementation of the scrypt key derivation function, and JNI bindings for the SSE-optimized C implementation. The Java implementation is based in large part on Colin Percival's reference implementation contained in scrypt-1.1.6/lib/crypto/crypto_scrypt-ref.c, but any errors in this port are solely the fault of its author, Will Glozer. http://www.tarsnap.com/scrypt/scrypt-1.1.6.tgz http://www.tarsnap.com/scrypt/scrypt.pdf Usage com.lambdaworks.crypto.SCryptUtil implements a modified version of MCF, the modular crypt format, similar to the one used for storage of Unix passwords in the MD5, SHA-256, and bcrypt formats. SCryptUtil.scrypt(passwd, N, r, p) SCryptUtil.check(passwd, hashed) The output of SCryptUtil.scrypt is a string in the modified MCF format: $s0$params$salt$key s0 - version 0 of the format with 128-bit salt and 256-bit derived key params - 32-bit hex integer containing log2(N) (16 bits), r (8 bits), and p (8 bits) salt - base64-encoded salt key - base64-encoded derived key Example: $s0$e0801$epIxT/h6HbbwHaehFnh/bw==$7H0vsXlY8UxxyW/BWx/9GuY7jEvGjT71GFd6O4SZND0= passwd = "secret" N = 16384 r = 8 p = 1 Maven Artifacts Releases containing the pure Java implementation, as well as native libraries for a limited number of platforms, are available in the maven central repository. <dependency> <groupId>com.lambdaworks</groupId> <artifactId>scrypt</artifactId> <version>1.1.0</version> </dependency> Native Code Implementation The native/ directory contains the SSE-optimized C implementation of scrypt along with JNI bindings and can be built with the usual autotools ./configure && make When the native library can be loaded it will be used instead of the pure Java implementation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.