|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.security.KeyFactorySpi | +--au.net.aba.crypto.provider.RSAKeyFactory
This class is used to convert RSA keys into a format usable by the ABA provider. Currently this class can convert from a KeySpec into a Key, or from one of the standard RSA Key interfaces into an ABA key.
The supported KeySpec classes are AsciiEncodedKeySpec, RSAPrivateCrtKeySpec, RSAPublicKeySpec, X509EncodedKeySpec and PKCS8EncodedKeySpec.
The supported RSA Key interfaces are RSAPublicKey, RSAPrivateKey and RSAPrivateCrtKey.
This class should not be instantiated directly, instead use the java.security.KeyFactory interface.
java.security.KeyFactory
,
,
,
,
,
,
,
Field Summary | |
static java.lang.String |
ident
|
Constructor Summary | |
RSAKeyFactory()
|
Method Summary | |
protected java.security.PrivateKey |
engineGeneratePrivate(java.security.spec.KeySpec keySpec)
Generates a private key object from the provided key specification (key material). |
protected java.security.PublicKey |
engineGeneratePublic(java.security.spec.KeySpec keySpec)
Generates a public key object from the provided key specification (key material). |
protected java.security.spec.KeySpec |
engineGetKeySpec(java.security.Key key,
java.lang.Class spec)
Returns a specification (key material) of the given key object. |
protected java.security.Key |
engineTranslateKey(java.security.Key key)
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory. |
protected static java.math.BigInteger[] |
parseKey(byte[] keyBytes)
Parse a key from the ABA/PGP format into an array of BigIntegers. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String ident
Constructor Detail |
public RSAKeyFactory()
Method Detail |
protected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
protected java.security.spec.KeySpec engineGetKeySpec(java.security.Key key, java.lang.Class spec) throws java.security.spec.InvalidKeySpecException
Currently supports standard RSA keys and RSAPublicKeySpec, RSAPrivateKeySpec, RSAPrivateCrtKeySpec, X509EncodedKeySpec and PKCS8EncodedKeySpec KeySpec classes.
key
- the key the key material is to be recovered from.spec
- the class the new key spec object is meant to be from.protected java.security.Key engineTranslateKey(java.security.Key key) throws java.security.InvalidKeyException
This KeyFactory will convert any key that implements either RSAPrivateCrtKey, RSAPrivateKey, or the RSAPublicKey interface.
key
- the key to be translated.protected static java.math.BigInteger[] parseKey(byte[] keyBytes)
modulus.publicExp.privateExp.p.q
keyBytes
- an ASCII string describing the key.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |