com.mindbright.ssh2
Class SSH2DSS

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

public final class SSH2DSS
extends SSH2SimpleSignature

Implements "ssh-dss" 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
SSH2DSS()
          Constructor.
 
Method Summary
 PublicKey decodePublicKey(byte[] pubKeyBlob)
          Decode a public key blob.
 byte[] encodePublicKey(PublicKey publicKey)
          Encode the given public key into a public key blob.
 
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

SSH2DSS

public SSH2DSS()
Constructor.

Method Detail

encodePublicKey

public byte[] encodePublicKey(PublicKey publicKey)
                       throws SSH2Exception
Description copied from class: SSH2Signature
Encode the given public key into a public key blob.

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

decodePublicKey

public PublicKey decodePublicKey(byte[] pubKeyBlob)
                          throws SSH2Exception
Description copied from class: SSH2Signature
Decode a public key blob.

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