com.maverick.ssh.components.standalone
Class Ssh2RsaPublicKey
java.lang.Object
com.maverick.crypto.publickey.RsaKey
com.maverick.crypto.publickey.RsaPublicKey
com.maverick.ssh.components.standalone.Ssh2RsaPublicKey
- All Implemented Interfaces:
- com.maverick.crypto.publickey.PublicKey, SshPublicKey, SshRsaPublicKey
public class Ssh2RsaPublicKey
- extends com.maverick.crypto.publickey.RsaPublicKey
- implements SshRsaPublicKey
Represents an SSH2 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 |
| Methods inherited from class com.maverick.crypto.publickey.RsaKey |
getBitLength, getModulus, setModulus |
Ssh2RsaPublicKey
public Ssh2RsaPublicKey()
- Default constructor for initializing the key from a byte array using the
init method.
Ssh2RsaPublicKey
public Ssh2RsaPublicKey(BigInteger modulus,
BigInteger exponent)
- Construct an RSA key from parameters.
- Parameters:
modulus - exponent -
getEncoded
public byte[] getEncoded()
throws SshException
- Specified by:
getEncoded in interface SshPublicKey
- Throws:
SshException
getFingerprint
public String getFingerprint()
throws SshException
- Specified by:
getFingerprint in interface SshPublicKey
- Throws:
SshException
init
public void init(byte[] blob,
int start,
int len)
throws SshException
- Specified by:
init in interface SshPublicKey
- Throws:
SshException
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm in interface SshPublicKey
verifySignature
public boolean verifySignature(byte[] signature,
byte[] data)
- Specified by:
verifySignature in interface SshPublicKey- Overrides:
verifySignature in class com.maverick.crypto.publickey.RsaPublicKey
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.