com.maverick.ssh1
Class Ssh1RsaPublicKey
java.lang.Object
com.maverick.crypto.publickey.RsaKey
com.maverick.crypto.publickey.RsaPublicKey
com.maverick.ssh1.Ssh1RsaPublicKey
- All Implemented Interfaces:
- com.maverick.crypto.publickey.PublicKey, SshPublicKey
- public class Ssh1RsaPublicKey
- extends com.maverick.crypto.publickey.RsaPublicKey
- implements SshPublicKey
This class represents an SSH1 RSA public key.
- Author:
- Lee David Painter
Fields inherited from class com.maverick.crypto.publickey.RsaPublicKey |
ASN_SHA1, publicExponent |
Fields inherited from class com.maverick.crypto.publickey.RsaKey |
modulus |
Constructor Summary |
Ssh1RsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent)
Construct the RSA public key. |
Method Summary |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAlgorithm()
The algorithm name "rsa1" |
byte[] |
getEncoded()
Get the encoded format required by SSH1 |
java.lang.String |
getFingerprint()
Return an SSH fingerprint of the public key |
int |
hashCode()
|
void |
init(byte[] blob,
int offset,
int len)
Initiate the key from an encoded bte array. |
Methods inherited from class com.maverick.crypto.publickey.RsaPublicKey |
getPublicExponent, setPublicExponent, verifySignature |
Methods inherited from class com.maverick.crypto.publickey.RsaKey |
getBitLength, getModulus, setModulus |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Ssh1RsaPublicKey
public Ssh1RsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent)
- Construct the RSA public key.
- Parameters:
modulus
- publicExponent
-
getEncoded
public byte[] getEncoded()
throws SshException
- Get the encoded format required by SSH1
- Specified by:
getEncoded
in interface SshPublicKey
- Returns:
- an encoded byte array
- Throws:
SshException
init
public void init(byte[] blob,
int offset,
int len)
- Initiate the key from an encoded bte array. This implementation does
nothing because we do not provide a default constructor
- Specified by:
init
in interface SshPublicKey
- Parameters:
blob
- offset
- len
-
getFingerprint
public java.lang.String getFingerprint()
throws SshException
- Description copied from interface:
SshPublicKey
- Return an SSH fingerprint of the public key
- Specified by:
getFingerprint
in interface SshPublicKey
- Returns:
-
- Throws:
SshException
getAlgorithm
public java.lang.String getAlgorithm()
- The algorithm name "rsa1"
- Specified by:
getAlgorithm
in interface SshPublicKey
- Returns:
- the algorithm name, for example "ssh-dss"
equals
public boolean equals(java.lang.Object obj)
hashCode
public int hashCode()
Copyright © 2003 3SP LTD. All Rights Reserved.