org.nhindirect.config.store
Class Thumbprint

java.lang.Object
  extended by org.nhindirect.config.store.Thumbprint

public class Thumbprint
extends Object

NOTE: This is a copy of the original Thumbprint class from the agent code base. Copied to this package as a quick fix to a visibility issue. An X509Certificate thumb print. Thumb print is essentially a SHA-1 digest of the certificates der encoding.

Author:
Greg Meyer

Method Summary
 boolean equals(Object obj)
           
 byte[] getDigest()
          Gets the raw byte digest of the certificate's der encoding.
 String toString()
           
static Thumbprint toThumbprint(X509Certificate cert)
          Creates a thumbprint of an X509Certificate.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toThumbprint

public static Thumbprint toThumbprint(X509Certificate cert)
                               throws CertificateException
Creates a thumbprint of an X509Certificate.

Parameters:
cert - The certificate to convert.
Returns:
A thumbprint of the certificate.
Throws:
CertificateException

getDigest

public byte[] getDigest()
Gets the raw byte digest of the certificate's der encoding.

Returns:
The certificates digest.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2011. All Rights Reserved.