public class AsymmetricKeyPairFactoryRsaCompact extends AbstractAsymmetricKeyPairFactory<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>
AbstractAsymmetricKeyPairFactory for RSA in
compact format.| Modifier and Type | Field and Description |
|---|---|
private static byte |
BYTE_OFFSET |
private static int[] |
BYTE2POWER |
private static byte[] |
HEADER_ENCODED_PUBLIC_KEY |
| Constructor and Description |
|---|
AsymmetricKeyPairFactoryRsaCompact()
The constructor.
|
AsymmetricKeyPairFactoryRsaCompact(KeyFactory keyFactory)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asData(AsymmetricKeyPairRsa keyPair) |
byte[] |
asData(RSAPrivateKey privateKey) |
byte[] |
asData(RSAPublicKey publicKey) |
AsymmetricKeyPairRsa |
createKeyPair(byte[] data) |
AsymmetricKeyPairRsa |
createKeyPair(RSAPrivateKey privateKey,
RSAPublicKey publicKey) |
RSAPrivateKey |
createPrivateKey(byte[] data) |
RSAPublicKey |
createPublicKey(byte[] data) |
private Byte |
length2byte(int length) |
createPrivateKey, createPublicKey, getKeyFactory, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasBinaryasBinaryasBinaryprivate static final byte BYTE_OFFSET
private static final int[] BYTE2POWER
private static final byte[] HEADER_ENCODED_PUBLIC_KEY
public AsymmetricKeyPairFactoryRsaCompact()
public AsymmetricKeyPairFactoryRsaCompact(KeyFactory keyFactory)
keyFactory - the KeyFactory.private Byte length2byte(int length)
public byte[] asData(RSAPrivateKey privateKey)
privateKey - the PrivateKey to serialize.public RSAPrivateKey createPrivateKey(byte[] data)
data - the PrivateKey as raw byte array.PrivateKey.public byte[] asData(RSAPublicKey publicKey)
publicKey - the PublicKey to serialize.public RSAPublicKey createPublicKey(byte[] data)
public byte[] asData(AsymmetricKeyPairRsa keyPair)
keyPair - the AsymmetricKeyPair to serialize.public AsymmetricKeyPairRsa createKeyPair(byte[] data)
data - the AsymmetricKeyPair in its binary form.AsymmetricKeyPair.public AsymmetricKeyPairRsa createKeyPair(RSAPrivateKey privateKey, RSAPublicKey publicKey)
privateKey - the PrivateKey.publicKey - the corresponding PublicKey.AsymmetricKeyPair.Copyright © 2001–2019 mmm-Team. All rights reserved.