com.sshtools.j2ssh.transport.publickey
Class SshDss

java.lang.Object
  |
  +--com.sshtools.j2ssh.transport.publickey.SshDss
All Implemented Interfaces:
SshPublicKey

public class SshDss
extends java.lang.Object
implements SshPublicKey

Version:
1.0
Author:
Lee David Painter ( lee@sshtools.com )

Constructor Summary
SshDss()
           
 
Method Summary
 java.lang.String getFingerprint()
          Gets the keys fingerprint
 java.lang.String getFormattedKey()
          Gets the formatted key
 void init(byte[] hostKey)
          Constructor for the SshDssPublicKey object
 boolean verifySignature(byte[] signature, byte[] exchangeHash)
          Called by the framework to verify the signature received during key exchange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshDss

public SshDss()
Method Detail

init

public void init(byte[] hostKey)
          throws InvalidHostKeyException
Constructor for the SshDssPublicKey object

Specified by:
init in interface SshPublicKey
Parameters:
hostKey - The host key data
Throws:
InvalidHostKeyException - Thrown of the hopst key is invalid

verifySignature

public boolean verifySignature(byte[] signature,
                               byte[] exchangeHash)
                        throws InvalidHostKeySignatureException
Called by the framework to verify the signature received during key exchange

Specified by:
verifySignature in interface SshPublicKey
Parameters:
signature - The signature to verify
exchangeHash - The exchange hash produced during key exchange
Returns:
The result of the verification
Throws:
InvalidHostKeySignatureException - Thrown if the signature is in an invalid format

getFingerprint

public java.lang.String getFingerprint()
Gets the keys fingerprint

Specified by:
getFingerprint in interface SshPublicKey
Returns:
The fingerprint

getFormattedKey

public java.lang.String getFormattedKey()
Gets the formatted key

Specified by:
getFormattedKey in interface SshPublicKey
Returns:
The formatted key


Copyright © 2002 Sshtools.com. All Rights Reserved.