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.
- Version:
- $Revision: 1.7.2.1 $ $Date: 2005/11/08 03:12:52 $
- Author:
- Sameer Ajmani, Sean Radford
- See Also:
- Serialized Form
| Fields inherited from class jsdsi.Obj |
_obj |
|
Constructor Summary |
RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a)
Creates a new RSAPublicKey from a given modulus, exponent
and algorithm name. |
RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a,
java.net.URI[] u)
|
RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a,
java.net.URL[] u)
Deprecated. use RSAPublicKey(BigInteger, BigInteger, String, URI[]) |
RSAPublicKey(java.security.interfaces.RSAPublicKey k)
|
RSAPublicKey(java.security.interfaces.RSAPublicKey k,
java.net.URI[] u)
|
RSAPublicKey(java.security.interfaces.RSAPublicKey k,
java.net.URL[] u)
|
|
Method Summary |
static java.security.KeyPair |
create()
Creates a new RSA key pair whose public key is a Principal. |
static java.security.KeyPair |
create(java.lang.String a)
Creates a new RSA key pair whose public key is a Principal. |
static java.security.KeyPair |
create(java.lang.String a,
java.lang.String provider)
Creates a new RSA key pair whose public key is a Principal. |
boolean |
equals(java.lang.Object o)
|
java.math.BigInteger |
getExponent()
|
java.math.BigInteger |
getModulus()
|
java.math.BigInteger |
getPublicExponent()
|
int |
hashCode()
|
SexpList |
toPublicKeySexp()
|
| 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)
- Deprecated. use
RSAPublicKey(BigInteger, BigInteger, String, URI[])
- Creates a new
RSAPublicKey from a given modulus, exponent,
algorithm-name, and URLs.
- Parameters:
m - modulus.e - exponent.a - algorithm-name.u - list of URLs.
RSAPublicKey
public RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a,
java.net.URI[] u)
RSAPublicKey
public RSAPublicKey(java.math.BigInteger m,
java.math.BigInteger e,
java.lang.String a)
- Creates a new
RSAPublicKey from a given modulus, exponent
and algorithm name.
- Parameters:
m - modulus.e - exponent.a - algorithm name.
RSAPublicKey
public RSAPublicKey(java.security.interfaces.RSAPublicKey k,
java.net.URL[] u)
RSAPublicKey
public RSAPublicKey(java.security.interfaces.RSAPublicKey k,
java.net.URI[] 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
- Throws:
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
- Throws:
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.
- Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
getModulus
public java.math.BigInteger getModulus()
- Specified by:
getModulus in interface java.security.interfaces.RSAKey
- See Also:
RSAKey.getModulus()
getExponent
public java.math.BigInteger getExponent()
- Returns:
- the exponent of this
RSAPublicKey.
getPublicExponent
public java.math.BigInteger getPublicExponent()
- Specified by:
getPublicExponent in interface java.security.interfaces.RSAPublicKey
- See Also:
RSAPublicKey.getPublicExponent()
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals in interface java.security.Principal- Overrides:
equals in class PublicKey
- See Also:
Object.equals(Object)
hashCode
public int hashCode()
- Specified by:
hashCode in interface java.security.Principal- Overrides:
hashCode in class PublicKey
- See Also:
Object.hashCode()
toPublicKeySexp
public SexpList toPublicKeySexp()
Copyright © 2002-2006 JSDSI. All Rights Reserved.