com.maverick.ssh.components.standalone
Class Ssh1RsaPublicKey
java.lang.Object
com.maverick.crypto.publickey.RsaKey
com.maverick.crypto.publickey.RsaPublicKey
com.maverick.ssh.components.standalone.Ssh1RsaPublicKey
- All Implemented Interfaces:
- com.maverick.crypto.publickey.PublicKey, SshPublicKey, SshRsaPublicKey
public class Ssh1RsaPublicKey
- extends com.maverick.crypto.publickey.RsaPublicKey
- implements SshRsaPublicKey
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 |
| Methods inherited from class com.maverick.crypto.publickey.RsaPublicKey |
getPublicExponent, setPublicExponent, verifySignature |
| Methods inherited from class com.maverick.crypto.publickey.RsaKey |
getBitLength, getModulus, setModulus |
Ssh1RsaPublicKey
public Ssh1RsaPublicKey(BigInteger modulus,
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
- Throws:
SshException
init
public void init(byte[] blob,
int offset,
int len)
- Initiate the key from an encoded byte array. This implementation does
nothing because we do not provide a default constructor
- Specified by:
init in interface SshPublicKey
getFingerprint
public String getFingerprint()
throws SshException
- Specified by:
getFingerprint in interface SshPublicKey
- Throws:
SshException
getAlgorithm
public String getAlgorithm()
- The algorithm name "rsa1"
- Specified by:
getAlgorithm in interface SshPublicKey
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class com.maverick.crypto.publickey.RsaPublicKey
getVersion
public int getVersion()
- Specified by:
getVersion in interface SshRsaPublicKey
doPublic
public BigInteger doPublic(BigInteger input)
- Specified by:
doPublic in interface SshRsaPublicKey
Copyright © 2012. All Rights Reserved.