|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanon.crypto.AsymmetricCryptoKeyPair
public class AsymmetricCryptoKeyPair
A key pair used for signing and encryption with an asymmetric cryptographic algorithm.
| Field Summary | |
|---|---|
private static MyDSAPrivateKey |
dsaKey
|
private static MyECPrivateKey |
ecKey
|
static int |
KEY_LENGTH_1024
|
static int |
KEY_LENGTH_512
|
private IMyPrivateKey |
m_privateKey
|
private IMyPublicKey |
m_publicKey
|
private static java.util.Vector |
ms_privateKeyClasses
Stores all registered private key classes. |
private static java.util.Vector |
ms_publicKeyClasses
Stores all registered public key classes. |
private static MyRSAPrivateKey |
rsaKey
|
| Constructor Summary | |
|---|---|
AsymmetricCryptoKeyPair(IMyPrivateKey a_privateKey)
Creates a new key pair from a private key. |
|
AsymmetricCryptoKeyPair(org.bouncycastle.asn1.pkcs.PrivateKeyInfo a_keyInfo)
Creates a new key pair from a PrivateKeyInfo. |
|
| Method Summary | |
|---|---|
private static java.security.Key |
createAsymmetricCryptoKey(java.lang.Object a_keyInfo,
java.util.Enumeration a_keyClasses)
|
static IMyPublicKey |
createPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo a_keyInfo)
Creates a new public key from a SubjectPublicKeyInfo. |
IMyPrivateKey |
getPrivate()
Returns the private key. |
private static java.util.Enumeration |
getPrivateKeyClasses()
Returns all registered private key classes. |
IMyPublicKey |
getPublic()
Returns the public key. |
private static java.util.Enumeration |
getPublicKeyClasses()
Returns all registered public key classes. |
protected static boolean |
isValidKeyPair(AsymmetricCryptoKeyPair a_keyPair)
Tests if a given key pair is a valid key pair. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int KEY_LENGTH_512
public static final int KEY_LENGTH_1024
private static final MyDSAPrivateKey dsaKey
private static final MyRSAPrivateKey rsaKey
private static final MyECPrivateKey ecKey
private static java.util.Vector ms_privateKeyClasses
private static java.util.Vector ms_publicKeyClasses
private IMyPrivateKey m_privateKey
private IMyPublicKey m_publicKey
| Constructor Detail |
|---|
public AsymmetricCryptoKeyPair(IMyPrivateKey a_privateKey)
a_privateKey - a private key
public AsymmetricCryptoKeyPair(org.bouncycastle.asn1.pkcs.PrivateKeyInfo a_keyInfo)
throws java.security.InvalidKeyException
a_keyInfo - a PrivateKeyInfo object
java.security.InvalidKeyException - if no private key could be created from this key infoIMyPrivateKey,
ClassUtil.loadClasses()| Method Detail |
|---|
public static final IMyPublicKey createPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo a_keyInfo)
throws java.security.InvalidKeyException
a_keyInfo - a SubjectPublicKeyInfo describing a public key
java.security.InvalidKeyException - if no public key could be created from this key infoClassUtil.loadClasses(),
IMyPublicKeypublic final IMyPrivateKey getPrivate()
public final IMyPublicKey getPublic()
protected static final boolean isValidKeyPair(AsymmetricCryptoKeyPair a_keyPair)
a_keyPair - an AsymmetricKeyPair
private static java.security.Key createAsymmetricCryptoKey(java.lang.Object a_keyInfo,
java.util.Enumeration a_keyClasses)
throws java.security.InvalidKeyException
java.security.InvalidKeyExceptionprivate static java.util.Enumeration getPrivateKeyClasses()
ClassUtil.loadClasses(),
IMyPrivateKeyprivate static java.util.Enumeration getPublicKeyClasses()
ClassUtil.loadClasses(),
IMyPublicKey
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||