Package com.mku.salmon.password
Interface ISalmonPbkdfProvider
- All Known Implementing Classes:
SalmonDefaultPbkdfProvider
public interface ISalmonPbkdfProvider
Provides key derivation based on text passwords.
-
Field Details
-
PBKDF_SHA256
Java Cipher key for SHA256. See javax.crypto.SecretKeyFactory.- See Also:
-
PBKDF_SHA1
Deprecated.Java Cipher key for SHA1. See javax.crypto.SecretKeyFactory. WARNING! SHA1 is considered insecure! Use PBKDF_SHA256 instead.- See Also:
-
-
Method Details
-
getPbkdfAlgoString
Get the PBKDF java cipher algorigthm string.- Parameters:
pbkdfAlgo
- The PBKDF algorithm to use- Returns:
- The java 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:
SalmonSecurityException
- Thrown if there is a security exception
-