PR - type of PrivateKey.PU - type of PublicKey.PAIR - type of AsymmetricKeyPair.public class AsymmetricKeyPairFactoryEncoded<PR extends PrivateKey,PU extends PublicKey,PAIR extends AbstractAsymmetricKeyPair<PR,PU>> extends AbstractAsymmetricKeyPairFactory<PR,PU,PAIR>
AsymmetricKeyPairFactory for encoded format
based on PKCS8EncodedKeySpec and X509EncodedKeySpec.| Modifier and Type | Field and Description |
|---|---|
private AsymmetricKeyPairFactorySimple<PR,PU,PAIR> |
keyPairCreator |
| Constructor and Description |
|---|
AsymmetricKeyPairFactoryEncoded(KeyFactory keyFactory,
AsymmetricKeyPairFactorySimple<PR,PU,PAIR> keyPairCreator)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asData(PAIR keyPair) |
byte[] |
asData(PR privateKey) |
byte[] |
asData(PU publicKey) |
PAIR |
createKeyPair(byte[] data) |
PAIR |
createKeyPair(PR privateKey,
PU publicKey) |
PR |
createPrivateKey(byte[] data) |
PU |
createPublicKey(byte[] data) |
createPrivateKey, createPublicKey, getKeyFactory, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasBinaryasBinaryasBinaryprivate AsymmetricKeyPairFactorySimple<PR extends PrivateKey,PU extends PublicKey,PAIR extends AbstractAsymmetricKeyPair<PR,PU>> keyPairCreator
public AsymmetricKeyPairFactoryEncoded(KeyFactory keyFactory, AsymmetricKeyPairFactorySimple<PR,PU,PAIR> keyPairCreator)
keyFactory - the KeyFactory.keyPairCreator - the AsymmetricKeyPairFactorySimple.public byte[] asData(PR privateKey)
privateKey - the PrivateKey to serialize.public PR createPrivateKey(byte[] data)
data - the PrivateKey as raw byte array.PrivateKey.public byte[] asData(PU publicKey)
publicKey - the PublicKey to serialize.public PU createPublicKey(byte[] data)
public byte[] asData(PAIR keyPair)
keyPair - the AsymmetricKeyPair to serialize.public PAIR createKeyPair(PR privateKey, PU publicKey)
privateKey - the PrivateKey.publicKey - the corresponding PublicKey.AsymmetricKeyPair.public PAIR createKeyPair(byte[] data)
data - the AsymmetricKeyPair in its binary form.AsymmetricKeyPair.Copyright © 2001–2019 mmm-Team. All rights reserved.