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 SymmetricCryptorConfiggetConfig()DecryptornewDecryptorUnsafe(Key decryptionKey)Please use typesafenewEncryptormethod instead to avoid mistakes (passing wrongKey).EncryptornewEncryptorUnsafe(Key encryptionKey)Please use typesafenewDecryptormethod 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:CryptorFactoryPlease use typesafenewEncryptormethod instead to avoid mistakes (passing wrongKey).- Specified by:
newDecryptorUnsafein interfaceCryptorFactory- Overrides:
newDecryptorUnsafein classCryptorFactoryImpl- Parameters:
decryptionKey- theKeyto use for decryption.- Returns:
- the
Decryptorfor decryption.
-
newEncryptorUnsafe
public Encryptor newEncryptorUnsafe(Key encryptionKey)
Description copied from interface:CryptorFactoryPlease use typesafenewDecryptormethod instead to avoid mistakes (passing wrongKey).- Specified by:
newEncryptorUnsafein interfaceCryptorFactory- Overrides:
newEncryptorUnsafein classCryptorFactoryImpl- Parameters:
encryptionKey- theKeyto use for encryption.- Returns:
- the
Encryptorfor encryption.
-
getConfig
public SymmetricCryptorConfig getConfig()
- Specified by:
getConfigin classCryptorFactoryImpl- Returns:
- the
CryptorConfig.
-
-