Package org.bouncycastle.crypto.general
Class ElGamal.OperatorFactory
java.lang.Object
org.bouncycastle.crypto.general.ElGamal.OperatorFactory
- All Implemented Interfaces:
AsymmetricOperatorFactory<ElGamal.Parameters>
- Enclosing class:
ElGamal
Factory for creating ElGamal encryption/decryption operators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBlockDecryptor(AsymmetricKey key, ElGamal.Parameters parameters) Create a block decryptor for the passed in key and parameter set.createBlockEncryptor(AsymmetricKey key, ElGamal.Parameters parameters) Create a block encryptor for the passed in key and parameter set.protected org.bouncycastle.crypto.internal.AsymmetricBlockCiphercreateCipher(boolean forEncryption, AsymmetricKey key, ElGamal.Parameters parameters, SecureRandom random) protected static booleanisRawEngine(org.bouncycastle.crypto.internal.AsymmetricBlockCipher engine)
-
Constructor Details
-
OperatorFactory
public OperatorFactory()
-
-
Method Details
-
createBlockDecryptor
public SingleBlockDecryptor<ElGamal.Parameters> createBlockDecryptor(AsymmetricKey key, ElGamal.Parameters parameters) Description copied from interface:AsymmetricOperatorFactoryCreate a block decryptor for the passed in key and parameter set.- Parameters:
key- the key to be used in the decryptor.parameters- the parameter set for the decryptor.- Returns:
- an initialised block decryptor for the passed in arguments.
-
createCipher
protected org.bouncycastle.crypto.internal.AsymmetricBlockCipher createCipher(boolean forEncryption, AsymmetricKey key, ElGamal.Parameters parameters, SecureRandom random) -
createBlockEncryptor
public SingleBlockEncryptorUsingSecureRandom<ElGamal.Parameters> createBlockEncryptor(AsymmetricKey key, ElGamal.Parameters parameters) Description copied from interface:AsymmetricOperatorFactoryCreate a block encryptor for the passed in key and parameter set.- Specified by:
createBlockEncryptorin interfaceAsymmetricOperatorFactory<T extends Parameters>- Parameters:
key- the key to be used in the encryptor.parameters- the parameter set for the encryptor.- Returns:
- an initialised block encryptor for the passed in arguments.
-
isRawEngine
protected static boolean isRawEngine(org.bouncycastle.crypto.internal.AsymmetricBlockCipher engine)
-