Module io.github.mmm.crypto
Class SymmetricCryptorFactoryImpl<K extends SecretKey>
- java.lang.Object
-
- io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
-
- io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithProvider
-
- io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithRandom
-
- io.github.mmm.crypto.crypt.CryptorFactoryImpl
-
- io.github.mmm.crypto.symmetric.crypt.SymmetricCryptorFactoryImpl<K>
-
- Type Parameters:
K
- type ofSecretKey
.
- All Implemented Interfaces:
AbstractCryptoFactory
,CryptoAlgorithm
,CryptorFactory
,SymmetricCryptorFactory<K>
public class SymmetricCryptorFactoryImpl<K extends SecretKey> extends CryptorFactoryImpl implements SymmetricCryptorFactory<K>
Implementation ofSymmetricCryptorFactory
.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from class io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithProvider
provider
-
-
Constructor Summary
Constructors Constructor Description SymmetricCryptorFactoryImpl(SymmetricCryptorConfig config, RandomFactory randomFactory)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SymmetricCryptorConfig
getConfig()
Decryptor
newDecryptorUnsafe(Key decryptionKey)
Please use typesafenewEncryptor
method instead to avoid mistakes (passing wrongKey
).Encryptor
newEncryptorUnsafe(Key encryptionKey)
Please use typesafenewDecryptor
method instead to avoid mistakes (passing wrongKey
).-
Methods inherited from class io.github.mmm.crypto.crypt.CryptorFactoryImpl
getAlgorithm
-
Methods inherited from class io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithRandom
createSecureRandom, getRandomFactory
-
Methods inherited from class io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithProvider
getProvider
-
Methods inherited from class io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
creationFailedException, creationFailedException, creationFailedException, creationFailedException, getAlgorithm, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.crypto.symmetric.crypt.SymmetricCryptorFactory
newDecryptor, newEncryptor
-
-
-
-
Constructor Detail
-
SymmetricCryptorFactoryImpl
public SymmetricCryptorFactoryImpl(SymmetricCryptorConfig config, RandomFactory randomFactory)
The constructor.- Parameters:
config
- theSymmetricCryptorConfig
.randomFactory
- theRandomFactory
.
-
-
Method Detail
-
newDecryptorUnsafe
public Decryptor newDecryptorUnsafe(Key decryptionKey)
Description copied from interface:CryptorFactory
Please use typesafenewEncryptor
method instead to avoid mistakes (passing wrongKey
).- Specified by:
newDecryptorUnsafe
in interfaceCryptorFactory
- Overrides:
newDecryptorUnsafe
in classCryptorFactoryImpl
- Parameters:
decryptionKey
- theKey
to use for decryption.- Returns:
- the
Decryptor
for decryption.
-
newEncryptorUnsafe
public Encryptor newEncryptorUnsafe(Key encryptionKey)
Description copied from interface:CryptorFactory
Please use typesafenewDecryptor
method instead to avoid mistakes (passing wrongKey
).- Specified by:
newEncryptorUnsafe
in interfaceCryptorFactory
- Overrides:
newEncryptorUnsafe
in classCryptorFactoryImpl
- Parameters:
encryptionKey
- theKey
to use for encryption.- Returns:
- the
Encryptor
for encryption.
-
getConfig
public SymmetricCryptorConfig getConfig()
- Specified by:
getConfig
in classCryptorFactoryImpl
- Returns:
- the
CryptorConfig
.
-
-