Module io.github.mmm.crypto
Class AsymmetricKeyPairFactoryRsaCompact
- java.lang.Object
-
- io.github.mmm.crypto.asymmetric.key.AbstractAsymmetricKeyPairFactory<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>
-
- io.github.mmm.crypto.asymmetric.key.rsa.AsymmetricKeyPairFactoryRsaCompact
-
- All Implemented Interfaces:
AsymmetricKeyPairFactory<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>,AsymmetricKeyPairFactorySimple<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>,PrivateKeyFactory<RSAPrivateKey>,PublicKeyFactory<RSAPublicKey>
public class AsymmetricKeyPairFactoryRsaCompact extends AbstractAsymmetricKeyPairFactory<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>
Implementation ofAbstractAsymmetricKeyPairFactoryfor RSA incompact format.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description AsymmetricKeyPairFactoryRsaCompact()The constructor.AsymmetricKeyPairFactoryRsaCompact(KeyFactory keyFactory)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]asData(AsymmetricKeyPairRsa keyPair)byte[]asData(RSAPrivateKey privateKey)byte[]asData(RSAPublicKey publicKey)AsymmetricKeyPairRsacreateKeyPair(byte[] data)AsymmetricKeyPairRsacreateKeyPair(RSAPrivateKey privateKey, RSAPublicKey publicKey)RSAPrivateKeycreatePrivateKey(byte[] data)RSAPublicKeycreatePublicKey(byte[] data)-
Methods inherited from class io.github.mmm.crypto.asymmetric.key.AbstractAsymmetricKeyPairFactory
createPrivateKey, createPublicKey, getKeyFactory, 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.asymmetric.key.AsymmetricKeyPairFactory
asBinary
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.key.PrivateKeyFactory
asBinary
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.key.PublicKeyFactory
asBinary
-
-
-
-
Constructor Detail
-
AsymmetricKeyPairFactoryRsaCompact
public AsymmetricKeyPairFactoryRsaCompact()
The constructor.
-
AsymmetricKeyPairFactoryRsaCompact
public AsymmetricKeyPairFactoryRsaCompact(KeyFactory keyFactory)
The constructor.- Parameters:
keyFactory- theKeyFactory.
-
-
Method Detail
-
asData
public byte[] asData(RSAPrivateKey privateKey)
- Parameters:
privateKey- thePrivateKeyto serialize.- Returns:
- the serialized binary data.
-
createPrivateKey
public RSAPrivateKey createPrivateKey(byte[] data)
- Parameters:
data- thePrivateKeyas rawbytearray.- Returns:
- the deserialized
PrivateKey.
-
asData
public byte[] asData(RSAPublicKey publicKey)
- Parameters:
publicKey- thePublicKeyto serialize.- Returns:
- the serialized binary data.
-
createPublicKey
public RSAPublicKey createPublicKey(byte[] data)
-
asData
public byte[] asData(AsymmetricKeyPairRsa keyPair)
- Parameters:
keyPair- theAsymmetricKeyPairto serialize.- Returns:
- the serialized binary data.
-
createKeyPair
public AsymmetricKeyPairRsa createKeyPair(byte[] data)
- Parameters:
data- theAsymmetricKeyPairin its binary form.- Returns:
- the deserialized
AsymmetricKeyPair.
-
createKeyPair
public AsymmetricKeyPairRsa createKeyPair(RSAPrivateKey privateKey, RSAPublicKey publicKey)
- Parameters:
privateKey- thePrivateKey.publicKey- the correspondingPublicKey.- Returns:
- the
AsymmetricKeyPair.
-
-