public class AsymmetricCryptoKeyPair
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_LENGTH_1024 |
static int |
KEY_LENGTH_512 |
| Constructor and Description |
|---|
AsymmetricCryptoKeyPair(IMyPrivateKey a_privateKey)
Creates a new key pair from a private key.
|
AsymmetricCryptoKeyPair(mybouncycastle.org.bouncycastle.asn1.pkcs.PrivateKeyInfo a_keyInfo)
Creates a new key pair from a PrivateKeyInfo.
|
| Modifier and Type | Method and Description |
|---|---|
static IMyPublicKey |
createPublicKey(mybouncycastle.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo a_keyInfo)
Creates a new public key from a SubjectPublicKeyInfo.
|
IMyPrivateKey |
getPrivate()
Returns the private key.
|
IMyPublicKey |
getPublic()
Returns the public key.
|
public static final int KEY_LENGTH_512
public static final int KEY_LENGTH_1024
public AsymmetricCryptoKeyPair(IMyPrivateKey a_privateKey)
a_privateKey - a private keypublic AsymmetricCryptoKeyPair(mybouncycastle.org.bouncycastle.asn1.pkcs.PrivateKeyInfo a_keyInfo)
throws java.security.InvalidKeyException
a_keyInfo - a PrivateKeyInfo objectjava.security.InvalidKeyException - if no private key could be created from this key infoIMyPrivateKey,
ClassUtil.loadClasses()public static final IMyPublicKey createPublicKey(mybouncycastle.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo a_keyInfo) throws java.security.InvalidKeyException
a_keyInfo - a SubjectPublicKeyInfo describing a public keyjava.security.InvalidKeyException - if no public key could be created from this key infoClassUtil.loadClasses(),
IMyPublicKeypublic final IMyPrivateKey getPrivate()
public final IMyPublicKey getPublic()
Copyright © 2023. All rights reserved.