Does the Bouncy Castle SCrypt implementation include the factors in the result?

342 views Asked by At

I'm pretty sure it doesn't, but I want to confirm whether the SCrypt implementation in Bouncy Castle for Java, SCrypt.generate(), includes the parameters in the result (like an implementation for NodeJS does).

1

There are 1 answers

0
Rathan Naik On BEST ANSWER

No Bouncy castle does not include them in result, but if you want similar result you can use SpringFramework SCrypt.

import org.bouncycastle.crypto.generators.SCrypt;
public static void ScryptSpringFramework()
{   
    public static String plaintextPassword  = "myname123456";
    SCryptPasswordEncoder sEncoder = new SCryptPasswordEncoder();

    String str1 = sEncoder.encode(plaintextPassword);
    System.out.println("SpringFramework output of "+plaintextPassword+" = "+str1);              
}

Here is the link for the SpringFramework crypto.