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).
Asked
Active
Viewed 300 times
1

Pablo Fernandez
- 279,434
- 135
- 377
- 622
-
1If you mean [`SCrypt.generate()`](https://www.bouncycastle.org/docs/docs1.5on/org/bouncycastle/crypto/generators/SCrypt.html#generate(byte[],%20byte[],%20int,%20int,%20int,%20int)) then no, it only returns generated key bytes. – President James K. Polk Aug 28 '17 at 22:40
-
Yes, that one._ – Pablo Fernandez Aug 28 '17 at 23:05
1 Answers
2
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);
}

Rathan Naik
- 993
- 12
- 25