Package com.mku.salmon.password
Interface IPbkdfProvider
- All Known Implementing Classes:
DefaultPbkdfProvider
public interface IPbkdfProvider
Provides key derivation based on text passwords.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
PBKDF_SHA256
Cipher key for SHA256. See javax.crypto.SecretKeyFactory.- See Also:
-
-
Method Details
-
getPbkdfAlgoString
Get the PBKDF cipher algorithm string.- Parameters:
pbkdfAlgo- The PBKDF algorithm to use- Returns:
- The cipher algorithm string. See javax.crypto.SecretKeyFactory.
-
getKey
Get a key derived from a text password.- Parameters:
password- The text password.salt- The salt needs to be at least 24 bytes.iterations- Iterations to use. Make sure you use a high number according to your hardware specs.outputBytes- The length of the output key.pbkdfAlgo- The PBKDF algorithm to use- Returns:
- The key.
- Throws:
SecurityException- Thrown if there is a security exception
-