com.maverick.ssh
Class SshKeyFingerprint

java.lang.Object
  extended by com.maverick.ssh.SshKeyFingerprint

public class SshKeyFingerprint
extends java.lang.Object

Utility methods to generate an SSH public key fingerprint.

Author:
Lee David Painter

Field Summary
static java.lang.String MD5_FINGERPRINT
           
static java.lang.String SHA1_FINGERPRINT
           
static java.lang.String SHA256_FINGERPRINT
           
 
Constructor Summary
SshKeyFingerprint()
           
 
Method Summary
static java.lang.String getFingerprint(byte[] encoded)
          Generate an SSH key fingerprint as defined in draft-ietf-secsh-fingerprint-00.txt.
static java.lang.String getFingerprint(byte[] encoded, java.lang.String algorithm)
          Generate an SSH key fingerprint with a specific algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MD5_FINGERPRINT

public static final java.lang.String MD5_FINGERPRINT
See Also:
Constant Field Values

SHA1_FINGERPRINT

public static final java.lang.String SHA1_FINGERPRINT
See Also:
Constant Field Values

SHA256_FINGERPRINT

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

SshKeyFingerprint

public SshKeyFingerprint()
Method Detail

getFingerprint

public static java.lang.String getFingerprint(byte[] encoded)
                                       throws SshException
Generate an SSH key fingerprint as defined in draft-ietf-secsh-fingerprint-00.txt.

Parameters:
encoded -
Returns:
the key fingerprint, for example "c1:b1:30:29:d7:b8:de:6c:97:77:10:d7:46:41:63:87"
Throws:
SshException

getFingerprint

public static java.lang.String getFingerprint(byte[] encoded,
                                              java.lang.String algorithm)
                                       throws SshException
Generate an SSH key fingerprint with a specific algorithm.

Parameters:
encoded -
algorithm -
Returns:
the key fingerprint, for example "c1:b1:30:29:d7:b8:de:6c:97:77:10:d7:46:41:63:87"
Throws:
SshException


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.