kosprov / jargon2-backends Goto Github PK
View Code? Open in Web Editor NEWArgon2 implementations for the Jargon2 API
License: Apache License 2.0
Argon2 implementations for the Jargon2 API
License: Apache License 2.0
Hello,
I am writing a HowTo on Jargon2.
After importing both JARs in my project (jargon2-api-1.1.1.jar & jargon2-native-ri-backend-1.1.1.jar)...
I am using this code to "try" an easy hsashing :
`
public void hashMe() {
byte[] password = "this is a password".getBytes();
// Configure the hasher
Hasher hasher = jargon2Hasher()
.type(Type.ARGON2d) // Data-dependent hashing
.memoryCost(65536) // 64MB memory cost
.timeCost(3) // 3 passes through memory
.parallelism(4) // use 4 lanes and 4 threads
.saltLength(16) // 16 random bytes salt
.hashLength(16); // 16 bytes output hash
// Set the password and calculate the encoded hash
String encodedHash = hasher.password(password).encodedHash();
System.out.printf("Hash: %s%n", encodedHash);
// Just get a hold on the verifier. No special configuration needed
Verifier verifier = jargon2Verifier();
// Set the encoded hash, the password and verify
boolean matches = verifier.hash(encodedHash).password(password).verifyEncoded();
System.out.printf("Matches: %s%n", matches);
String newHash = "";
//newHash = PasswordHasher.encodedHash(hashIt.toCharArray());
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "Hashed string is '", newHash)); // To be passed to log
}
`
And this is the resulting ERROR I get :
java.util.ServiceConfigurationError: com.kosprov.jargon2.spi.Jargon2Backend: Provider com.kosprov.jargon2.nativeri.backend.NativeRiJargon2Backend could not be instantiated
What am I missing ?
Best regards,
Darlio...
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.