PR - type of PrivateKey.PU - type of PublicKey.PAIR - type of AsymmetricKeyPair.public interface AsymmetricKeyCreator<PR extends PrivateKey,PU extends PublicKey,PAIR extends AsymmetricKeyPair<PR,PU>> extends KeyCreator, AsymmetricKeyPairFactory<PR,PU,PAIR>
KeyCreator for dealing with asymmetric cryptographic keys.generateKeyPair(),
createPrivateKey(byte[], String),
createPublicKey(byte[], String),
createKeyPair(byte[], String)| Modifier and Type | Method and Description |
|---|---|
default net.sf.mmm.binary.api.Binary |
asBinary(PAIR keyPair,
String format) |
default net.sf.mmm.binary.api.Binary |
asBinary(PR privateKey,
String format) |
default net.sf.mmm.binary.api.Binary |
asBinary(PU publicKey,
String format) |
default byte[] |
asData(PAIR keyPair) |
byte[] |
asData(PAIR keyPair,
String format) |
default byte[] |
asData(PR privateKey) |
byte[] |
asData(PR privateKey,
String format) |
default byte[] |
asData(PU publicKey) |
byte[] |
asData(PU publicKey,
String format) |
default PAIR |
createKeyPair(byte[] data) |
PAIR |
createKeyPair(byte[] data,
String format) |
default PR |
createPrivateKey(byte[] data) |
PR |
createPrivateKey(byte[] data,
String format) |
default PU |
createPublicKey(byte[] data) |
PU |
createPublicKey(byte[] data,
String format) |
PAIR |
generateKeyPair() |
int |
getKeyLength(PR privateKey) |
int |
getKeyLength(PU publicKey) |
default void |
verifyKey(PR privateKey)
Verify that the given key matches the criteria of this key creator such as
key length. |
default void |
verifyKey(PU publicKey)
Verify that the given key matches the criteria of this key creator such as
key length. |
getKeyLengthgetAlgorithmasBinaryasBinaryasBinarycreateKeyPairPAIR generateKeyPair()
AsymmetricKeyPair with a generated private and public key for the underlying cryptography.default byte[] asData(PR privateKey)
asData in interface PrivateKeyFactory<PR extends PrivateKey>privateKey - the PrivateKey to serialize.default net.sf.mmm.binary.api.Binary asBinary(PR privateKey, String format)
privateKey - the PrivateKey to serialize.format - the the CryptoBinaryFormat to use.Binary.byte[] asData(PR privateKey, String format)
privateKey - the PrivateKey to serialize.format - the the CryptoBinaryFormat to use.default PR createPrivateKey(byte[] data)
createPrivateKey in interface PrivateKeyFactory<PR extends PrivateKey>data - the PrivateKey as raw byte array.PrivateKey.PR createPrivateKey(byte[] data, String format)
data - the PrivateKey as raw byte array.format - the CryptoBinaryFormat to use.PrivateKey.default byte[] asData(PU publicKey)
asData in interface PublicKeyFactory<PU extends PublicKey>publicKey - the PublicKey to serialize.default net.sf.mmm.binary.api.Binary asBinary(PU publicKey, String format)
publicKey - the PublicKey to serialize.format - the the CryptoBinaryFormat to use.Binary.byte[] asData(PU publicKey, String format)
publicKey - the PublicKey to serialize.format - the the CryptoBinaryFormat to use.default PU createPublicKey(byte[] data)
createPublicKey in interface PublicKeyFactory<PU extends PublicKey>data - the PublicKey as raw byte array.PublicKey.PU createPublicKey(byte[] data, String format)
data - the PublicKey as raw byte array.format - the the CryptoBinaryFormat to use.PublicKey.default byte[] asData(PAIR keyPair)
asData in interface AsymmetricKeyPairFactory<PR extends PrivateKey,PU extends PublicKey,PAIR extends AsymmetricKeyPair<PR,PU>>keyPair - the AsymmetricKeyPair to serialize.default net.sf.mmm.binary.api.Binary asBinary(PAIR keyPair, String format)
keyPair - the AsymmetricKeyPair to serialize.format - the the CryptoBinaryFormat to use.Binary.byte[] asData(PAIR keyPair, String format)
keyPair - the AsymmetricKeyPair to serialize.format - the the CryptoBinaryFormat to use.default PAIR createKeyPair(byte[] data)
createKeyPair in interface AsymmetricKeyPairFactory<PR extends PrivateKey,PU extends PublicKey,PAIR extends AsymmetricKeyPair<PR,PU>>data - the AsymmetricKeyPair in its binary form.AsymmetricKeyPair.PAIR createKeyPair(byte[] data, String format)
data - the AsymmetricKeyPair as raw byte array.format - the the CryptoBinaryFormat to use.AsymmetricKeyPair.int getKeyLength(PR privateKey)
privateKey - the PrivateKey.key length of the given key in bits.default void verifyKey(PR privateKey)
key length.privateKey - the PrivateKey to verify.int getKeyLength(PU publicKey)
publicKey - the PublicKey.key length of the given key in bits.default void verifyKey(PU publicKey)
key length.publicKey - the PublicKey to verify.Copyright © 2001–2019 mmm-Team. All rights reserved.