Giter VIP home page Giter VIP logo

jargon2-backends's People

Contributors

kosprov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nlamasol youcruit

jargon2-backends's Issues

HowTo install and use jargon2 WITHOUT Marven rep.

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.