|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.maverick.ssh.components.jce.Ssh2RsaPublicKey
public class 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(BigInteger modulus,
BigInteger publicExponent)
|
|
Ssh2RsaPublicKey(RSAPublicKey pubKey)
|
|
| Method Summary | |
|---|---|
BigInteger |
doPublic(BigInteger input)
|
boolean |
equals(Object obj)
|
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. |
String |
getFingerprint()
Return an SSH fingerprint of the public key |
BigInteger |
getModulus()
|
String |
getName()
Get the algorithm name for the public key. |
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(RSAPublicKey pubKey)
public Ssh2RsaPublicKey(BigInteger modulus,
BigInteger publicExponent)
throws NoSuchAlgorithmException,
InvalidKeySpecException
NoSuchAlgorithmException
InvalidKeySpecException| Method Detail |
|---|
public byte[] getEncoded()
throws SshException
SshPublicKey
getEncoded in interface SshPublicKeySshException
public 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 SshPublicKeySshExceptionpublic String getName()
SshPublicKey
getName in interface SshComponentgetName in interface SshPublicKey
public boolean verifySignature(byte[] signature,
byte[] data)
throws SshException
SshPublicKey
verifySignature in interface SshPublicKeytrue if the signature was produced by the corresponding
private key that owns this public key, otherwise false.
SshExceptionpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
public BigInteger doPublic(BigInteger input)
throws SshException
doPublic in interface SshRsaPublicKeySshExceptionpublic BigInteger getModulus()
getModulus in interface SshRsaPublicKeypublic 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 | |||||||||