jsdsi
Class RSAPublicKey
java.lang.Object
|
+--jsdsi.Obj
|
+--jsdsi.Principal
|
+--jsdsi.PublicKey
|
+--jsdsi.RSAPublicKey
- All Implemented Interfaces:
- Element, java.security.Key, java.security.Principal, java.security.PublicKey, java.security.interfaces.RSAKey, java.security.interfaces.RSAPublicKey, java.io.Serializable, Subject
- public class RSAPublicKey
- extends PublicKey
- implements java.security.interfaces.RSAPublicKey
An RSA public key.
- Author:
- Sameer Ajmani
- See Also:
- Serialized Form
Fields inherited from interface java.security.PublicKey |
serialVersionUID |
Constructor Summary |
RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a)
|
RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a,
java.net.URL[] u)
|
RSAPublicKey(java.security.interfaces.RSAPublicKey k)
|
RSAPublicKey(java.security.interfaces.RSAPublicKey k,
java.net.URL[] u)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Key |
getAlgorithm, getEncoded, getFormat |
Methods inherited from interface java.security.Principal |
toString |
RSAPublicKey
public RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a,
java.net.URL[] u)
RSAPublicKey
public RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a)
RSAPublicKey
public RSAPublicKey(java.security.interfaces.RSAPublicKey k,
java.net.URL[] u)
RSAPublicKey
public RSAPublicKey(java.security.interfaces.RSAPublicKey k)
create
public static java.security.KeyPair create(java.lang.String a,
java.lang.String provider)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
- Creates a new RSA key pair whose public key is a Principal.
- Parameters:
a
- the specific RSA algorithm to useprovider
- the provider to use
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
create
public static java.security.KeyPair create(java.lang.String a)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
- Creates a new RSA key pair whose public key is a Principal.
- Parameters:
a
- the specific RSA algorithm to use
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
create
public static java.security.KeyPair create()
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
- Creates a new RSA key pair whose public key is a Principal.
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
getModulus
public java.math.BigInteger getModulus()
- Specified by:
getModulus
in interface java.security.interfaces.RSAKey
getExponent
public java.math.BigInteger getExponent()
getPublicExponent
public java.math.BigInteger getPublicExponent()
- Specified by:
getPublicExponent
in interface java.security.interfaces.RSAPublicKey
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.security.Principal
- Overrides:
equals
in class PublicKey
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.security.Principal
- Overrides:
hashCode
in class PublicKey
toPublicKeySexp
public SexpList toPublicKeySexp()
- Specified by:
toPublicKeySexp
in class PublicKey
parseRSAPublicKey
static RSAPublicKey parseRSAPublicKey(SexpList l,
java.lang.String algo)
throws SexpParseException
SexpParseException