Class au.net.aba.crypto.provider.RSAKeyFactory
All Packages Class Hierarchy This Package Previous Next Index
Class au.net.aba.crypto.provider.RSAKeyFactory
java.lang.Object
|
+----au.net.aba.security.KeyFactory
|
+----au.net.aba.crypto.provider.RSAKeyFactory
- public class RSAKeyFactory
- extends KeyFactory
This class is used to convert RSA keys into a format usable by the
ABA provider. Currently this class can only convert from a KeySpec
into a Key. The supported KeySpec classes are AsciiEncodedKeySpec,
RSAPrivateCrtKeySpec and RSAPublicKeySpec.
This class should not be instantiated directly, instead use the
java.security.KeyFactory interface.
- See Also:
- KeyFactory
-
ident
-
-
RSAKeyFactory()
-
-
engineGeneratePrivate(KeySpec)
- Generates a private key object from the provided key specification
(key material).
-
engineGeneratePublic(KeySpec)
- Generates a public key object from the provided key specification
(key material).
-
engineGetKeySpec(Key, Class)
- Returns a specification (key material) of the given key object.
-
engineTranslateKey(Key)
- Translates a key object, whose provider may be unknown or
potentially untrusted, into a corresponding key object of this key
factory.
-
parseKey(byte[])
- Parse a key from the ABA/PGP format into an array of
BigIntegers.
ident
public final static String ident
RSAKeyFactory
public RSAKeyFactory()
engineGeneratePrivate
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
- Generates a private key object from the provided key specification
(key material). This class supports the AsciiEncodedKeySpec and
RSAPrivateCrtKeySpec KeySpec classes.
- Returns:
- s The private key.
- Throws: InvalidKeySpecException
- The provided KeySpec was not
an AsciiEncodedKeySpec or RSAPrivateCrtKeySpec KeySpec.
- Overrides:
- engineGeneratePrivate in class KeyFactory
engineGeneratePublic
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
- Generates a public key object from the provided key specification
(key material). This class supports the AsciiEncodedKeySpec and
RSAPublicKeySpec KeySpec classes.
- Returns:
- s The public key.
- Throws: InvalidKeySpecException
- The provided KeySpec was not
an AsciiEncodedKeySpec or RSAPublicKeySpec KeySpec.
- Overrides:
- engineGeneratePublic in class KeyFactory
engineGetKeySpec
protected KeySpec engineGetKeySpec(Key key,
Class spec)
- Returns a specification (key material) of the given key object.
keySpec identifies the specification class in which the key material
should be returned. It could, for example, be DSAPublicKeySpec.class,
to indicate that the key material should be returned in an instance
of the DSAPublicKeySpec class.
Not currently implemented.
- Overrides:
- engineGetKeySpec in class KeyFactory
engineTranslateKey
protected Key engineTranslateKey(Key key)
- Translates a key object, whose provider may be unknown or
potentially untrusted, into a corresponding key object of this key
factory.
Not currently implemented.
- Overrides:
- engineTranslateKey in class KeyFactory
parseKey
protected static BigInteger[] parseKey(byte keyBytes[])
- Parse a key from the ABA/PGP format into an array of
BigIntegers. The format is:
modulus.publicExp.privateExp.p.q
All Packages Class Hierarchy This Package Previous Next Index