com.maverick.ssh.components.jce
Class Ssh1RsaPublicKey
java.lang.Object
com.maverick.ssh.components.jce.Ssh2RsaPublicKey
com.maverick.ssh.components.jce.Ssh1RsaPublicKey
- All Implemented Interfaces:
- SshComponent, SshPublicKey, SshRsaPublicKey
public class Ssh1RsaPublicKey
- extends Ssh2RsaPublicKey
RSA public key implementation for the SSH1 protocol. Different implementations
are required for SSH1 & SSH2 because of the way the keys are represented in the
protocol encoding.
- Author:
- Lee David Painter
| Methods inherited from class com.maverick.ssh.components.jce.Ssh2RsaPublicKey |
doPublic, equals, getBitLength, getFingerprint, getJCEPublicKey, getModulus, getName, getPublicExponent, hashCode, init, verifySignature |
Ssh1RsaPublicKey
public Ssh1RsaPublicKey(RSAPublicKey pub)
Ssh1RsaPublicKey
public Ssh1RsaPublicKey(BigInteger modulus,
BigInteger publicExponent)
throws NoSuchAlgorithmException,
InvalidKeySpecException
- Throws:
NoSuchAlgorithmException
InvalidKeySpecException
getEncoded
public byte[] getEncoded()
throws SshException
- Get the encoded format required by SSH1
- Specified by:
getEncoded in interface SshPublicKey- Overrides:
getEncoded in class Ssh2RsaPublicKey
- Returns:
- an encoded byte array
- Throws:
SshException
getAlgorithm
public String getAlgorithm()
- The algorithm name "rsa1"
getVersion
public int getVersion()
- Specified by:
getVersion in interface SshRsaPublicKey- Overrides:
getVersion in class Ssh2RsaPublicKey
Copyright © 2013. All Rights Reserved.