- 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
-
- All Implemented Interfaces:
CryptoAlgorithm
,AbstractGetKeyLength
- Direct Known Subclasses:
SymmetricKeyConfigPbe
public abstract class SymmetricKeyConfig extends KeyConfig
KeyConfig
for symmetric cryptography.- 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 SymmetricKeyConfig(String algorithm, SecurityProvider provider, int keyLength, SymmetricKeySpecFactory keySpecFactory)
The constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
getKeyLength(SecretKey key, SecretKeyFactory keyFactory)
SymmetricKeySpecFactory
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
-
SymmetricKeyConfig
public SymmetricKeyConfig(String algorithm, SecurityProvider provider, int keyLength, SymmetricKeySpecFactory keySpecFactory)
The constructor.- Parameters:
algorithm
- thealgorithm
.provider
- theSecurityProvider
.keyLength
- thekey length
in bits.keySpecFactory
- thekey spec factory
.
-
-
Method Detail
-
getKeySpecFactory
public SymmetricKeySpecFactory getKeySpecFactory()
- Returns:
- the
SymmetricKeySpecFactory
.
-
getKeyLength
public abstract int getKeyLength(SecretKey key, SecretKeyFactory keyFactory)
- Parameters:
key
- theSecretKey
.keyFactory
- theSecretKeyFactory
.- Returns:
- the
key length
of the givenSecretKey
.
-
-