Module io.github.mmm.crypto
Class SymmetricKeyConfigPbe
- java.lang.Object
-
- io.github.mmm.crypto.CryptoConfig
-
- io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
-
- io.github.mmm.crypto.key.KeyConfig
-
- io.github.mmm.crypto.symmetric.key.SymmetricKeyConfig
-
- io.github.mmm.crypto.symmetric.key.pbe.SymmetricKeyConfigPbe
-
- All Implemented Interfaces:
CryptoAlgorithm,AbstractGetKeyLength
public class SymmetricKeyConfigPbe extends SymmetricKeyConfig
SymmetricKeyConfigfor PBE (Password Based Encryption).- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
algorithm
-
Fields inherited from class io.github.mmm.crypto.CryptoConfig
provider
-
-
Constructor Summary
Constructors Constructor Description SymmetricKeyConfigPbe(String algorithm, int keyLength)The constructor.SymmetricKeyConfigPbe(String algorithm, int keyLength, int iterationCount)The constructor.SymmetricKeyConfigPbe(String algorithm, int keyLength, int iterationCount, byte[] salt)The constructor.SymmetricKeyConfigPbe(String algorithm, SecurityProvider provider, int keyLength)The constructor.SymmetricKeyConfigPbe(String algorithm, SecurityProvider provider, int keyLength, int iterationCount, byte[] salt)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetKeyLength(SecretKey key, SecretKeyFactory keyFactory)-
Methods inherited from class io.github.mmm.crypto.symmetric.key.SymmetricKeyConfig
getKeySpecFactory
-
Methods inherited from class io.github.mmm.crypto.key.KeyConfig
getKeyLength
-
Methods inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
getAlgorithm
-
Methods inherited from class io.github.mmm.crypto.CryptoConfig
getProvider
-
-
-
-
Constructor Detail
-
SymmetricKeyConfigPbe
public SymmetricKeyConfigPbe(String algorithm, int keyLength)
The constructor.- Parameters:
algorithm- thealgorithm.keyLength- thekey lengthin bits.
-
SymmetricKeyConfigPbe
public SymmetricKeyConfigPbe(String algorithm, SecurityProvider provider, int keyLength)
The constructor.- Parameters:
algorithm- thealgorithm.provider- theSecurityProvider.keyLength- thekey lengthin bits.
-
SymmetricKeyConfigPbe
public SymmetricKeyConfigPbe(String algorithm, int keyLength, int iterationCount)
The constructor.- Parameters:
algorithm- thealgorithm.keyLength- thekey lengthin bits.iterationCount- theiteration count.
-
SymmetricKeyConfigPbe
public SymmetricKeyConfigPbe(String algorithm, int keyLength, int iterationCount, byte[] salt)
The constructor.- Parameters:
algorithm- thealgorithm.keyLength- thekey lengthin bits.iterationCount- theiteration count.salt- thesalt.
-
SymmetricKeyConfigPbe
public SymmetricKeyConfigPbe(String algorithm, SecurityProvider provider, int keyLength, int iterationCount, byte[] salt)
The constructor.- Parameters:
algorithm- thealgorithm.provider- theSecurityProvider.keyLength- thekey lengthin bits.iterationCount- theiteration count.salt- thesalt.
-
-
Method Detail
-
getKeyLength
public int getKeyLength(SecretKey key, SecretKeyFactory keyFactory)
- Specified by:
getKeyLengthin classSymmetricKeyConfig- Parameters:
key- theSecretKey.keyFactory- theSecretKeyFactory.- Returns:
- the
key lengthof the givenSecretKey.
-
-