Package org.bouncycastle.crypto.general
Class ElGamal.KeyWrapOperatorFactory
java.lang.Object
org.bouncycastle.crypto.general.ElGamal.KeyWrapOperatorFactory
- All Implemented Interfaces:
KeyWrapOperatorFactory<ElGamal.WrapParameters,
AsymmetricDHKey>
- Enclosing class:
- ElGamal
public static final class ElGamal.KeyWrapOperatorFactory
extends Object
implements KeyWrapOperatorFactory<ElGamal.WrapParameters,AsymmetricDHKey>
Factory for creating ElGamal key wrap/unwrap operators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateKeyUnwrapper
(AsymmetricDHKey key, ElGamal.WrapParameters parameters) Create a key un-wrapper using the passed in key and parameters.createKeyWrapper
(AsymmetricDHKey key, ElGamal.WrapParameters parameters) Create a key wrapper using the passed in key and parameters.
-
Constructor Details
-
KeyWrapOperatorFactory
public KeyWrapOperatorFactory()
-
-
Method Details
-
createKeyWrapper
public KeyWrapperUsingSecureRandom<ElGamal.WrapParameters> createKeyWrapper(AsymmetricDHKey key, ElGamal.WrapParameters parameters) Description copied from interface:KeyWrapOperatorFactory
Create a key wrapper using the passed in key and parameters.- Specified by:
createKeyWrapper
in interfaceKeyWrapOperatorFactory<ElGamal.WrapParameters,
AsymmetricDHKey> - Parameters:
key
- the key to initialize the wrapper with.parameters
- the parameters to initialize the wrapper with.- Returns:
- an initialized key wrapper.
-
createKeyUnwrapper
public KeyUnwrapperUsingSecureRandom<ElGamal.WrapParameters> createKeyUnwrapper(AsymmetricDHKey key, ElGamal.WrapParameters parameters) Description copied from interface:KeyWrapOperatorFactory
Create a key un-wrapper using the passed in key and parameters.- Specified by:
createKeyUnwrapper
in interfaceKeyWrapOperatorFactory<ElGamal.WrapParameters,
AsymmetricDHKey> - Parameters:
key
- the key to initialize the un-wrapper with.parameters
- the parameters to initialize the un-wrapper with.- Returns:
- an initialized key un-wrapper.
-