Java Globus API: Class HashUtil

org.globus.security
Class HashUtil

java.lang.Object
  |
  +--org.globus.security.HashUtil

public class HashUtil
extends java.lang.Object

This class produces a hash value of the certificate name in the OpenSSL/SSLeay way. It can be used to find the filename of the certificate based on the certificate subject DN. Example: (iaik specific)

  .
  Name nm = (Name)cert.getSubjectDN();
  byte [] raw = nm.getEncoded();
  String hash = HashUtil.hash(raw);
  .
  


Constructor Summary
HashUtil()
           
 
Method Summary
static java.lang.String hash(byte[] data)
          Returns the hash value from the given byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashUtil

public HashUtil()
Method Detail

hash

public static java.lang.String hash(byte[] data)
Returns the hash value from the given byte array. The input array is (supposed to be) a ASN.1 encoding of the certificate name.
Parameters:
data - input array
Returns:
hex encoded hash value