|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.maverick.ssh.components.jce.Ssh2RsaPublicKey
A RSA public key implementation which uses a JCE provider.
| Constructor Summary | |
Ssh2RsaPublicKey()
Default constructor for initializing the key from a byte array using the init method. |
|
Ssh2RsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent)
|
|
Ssh2RsaPublicKey(java.security.interfaces.RSAPublicKey pubKey)
|
|
| Method Summary | |
java.math.BigInteger |
doPublic(java.math.BigInteger input)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAlgorithm()
Get the algorithm name for the public key. |
int |
getBitLength()
Get the bit length of the public key |
byte[] |
getEncoded()
Encode the public key into a blob of binary data, the encoded result will be passed into init to recreate the key. |
java.lang.String |
getFingerprint()
Return an SSH fingerprint of the public key |
java.math.BigInteger |
getModulus()
|
java.math.BigInteger |
getPublicExponent()
|
int |
getVersion()
|
int |
hashCode()
|
void |
init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data. |
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Ssh2RsaPublicKey()
public Ssh2RsaPublicKey(java.security.interfaces.RSAPublicKey pubKey)
public Ssh2RsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException
| Method Detail |
public byte[] getEncoded()
throws SshException
SshPublicKey
getEncoded in interface SshPublicKeySshException
public java.lang.String getFingerprint()
throws SshException
SshPublicKey
getFingerprint in interface SshPublicKeySshExceptionpublic int getBitLength()
SshPublicKey
getBitLength in interface SshPublicKey
public void init(byte[] blob,
int start,
int len)
throws SshException
SshPublicKey
init in interface SshPublicKeyblob - start - len -
SshExceptionpublic java.lang.String getAlgorithm()
SshPublicKey
getAlgorithm in interface SshPublicKey
public boolean verifySignature(byte[] signature,
byte[] data)
throws SshException
SshPublicKey
verifySignature in interface SshPublicKeysignature - data -
true if the signature was produced by the corresponding
private key that owns this public key, otherwise false.
SshExceptionpublic boolean equals(java.lang.Object obj)
public int hashCode()
public java.math.BigInteger doPublic(java.math.BigInteger input)
throws SshException
doPublic in interface SshRsaPublicKeySshExceptionpublic java.math.BigInteger getModulus()
getModulus in interface SshRsaPublicKeypublic java.math.BigInteger getPublicExponent()
getPublicExponent in interface SshRsaPublicKeypublic int getVersion()
getVersion in interface SshRsaPublicKey
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||