com.mindbright.ssh2
Class SSH2RSA

java.lang.Object
  extended by com.mindbright.ssh2.SSH2Signature
      extended by com.mindbright.ssh2.SSH2SimpleSignature
          extended by com.mindbright.ssh2.SSH2RSA
All Implemented Interfaces:
SSH2PKISigner

public final class SSH2RSA
extends SSH2SimpleSignature

Implements "ssh-rsa" signatures according to the ssh standard.


Field Summary
static java.lang.String SSH2_KEY_FORMAT
           
 
Fields inherited from class com.mindbright.ssh2.SSH2SimpleSignature
draftIncompatibleSignature, signatureAlgorithm, ssh2KeyFormat
 
Fields inherited from class com.mindbright.ssh2.SSH2Signature
algorithm, privateKey, pubKeyBlob, publicKey, signature
 
Constructor Summary
SSH2RSA()
           
 
Method Summary
 PublicKey decodePublicKey(byte[] pubKeyBlob)
          Decode a public key encoded according to the ssh standard.
 byte[] encodePublicKey(PublicKey publicKey)
          Encode the given public key according to the ssh standard.
 
Methods inherited from class com.mindbright.ssh2.SSH2SimpleSignature
decodeSignature, encodeSignature, getKeyFormat, getSignatureAlgorithm, getVerifyInstance, setIncompatibility
 
Methods inherited from class com.mindbright.ssh2.SSH2Signature
clearSensitiveData, getAlgorithmName, getEncodingInstance, getInstance, getPublicKey, getPublicKeyBlob, initSign, initVerify, initVerify, setPublicKey, sign, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSH2_KEY_FORMAT

public static final java.lang.String SSH2_KEY_FORMAT
See Also:
Constant Field Values
Constructor Detail

SSH2RSA

public SSH2RSA()
Method Detail

encodePublicKey

public byte[] encodePublicKey(PublicKey publicKey)
                       throws SSH2Exception
Encode the given public key according to the ssh standard.

Specified by:
encodePublicKey in class SSH2Signature
Parameters:
publicKey - The public key to encode. Must be an instance of RSAPublicKey.
Returns:
A byte array containing the key suitably encoded.
Throws:
SSH2Exception

decodePublicKey

public PublicKey decodePublicKey(byte[] pubKeyBlob)
                          throws SSH2Exception
Decode a public key encoded according to the ssh standard.

Specified by:
decodePublicKey in class SSH2Signature
Parameters:
pubKeyBlob - A byte array containing a public key blob.
Returns:
A Publickey instance.
Throws:
SSH2Exception