dermi.util.pastry
Class HashGenerator

java.lang.Object
  extended by dermi.util.pastry.HashGenerator

public class HashGenerator
extends java.lang.Object

Utility class for generating SHA-1 hashes

Version:
1.2
Author:
Carles Pairot

Constructor Summary
HashGenerator()
           
 
Method Summary
static Id generateHash(java.util.Hashtable data)
          Generates a hash for the keys contained in the hashtable
static Id generateHash(java.lang.String data)
          Generates a hash for the specified string
static java.lang.String generateKeyId(java.util.Hashtable data)
          Helper method to generate an id string
static Id generateSessionHash(java.util.Hashtable data)
          Helper method to generate a hash for the keys contained in the hashtable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashGenerator

public HashGenerator()
Method Detail

generateHash

public static Id generateHash(java.util.Hashtable data)
Generates a hash for the keys contained in the hashtable

Parameters:
data - Hasthable containing the keys
Returns:
The NodeId hash object

generateHash

public static Id generateHash(java.lang.String data)
Generates a hash for the specified string

Parameters:
data - String to be hashed
Returns:
The NodeId hash object

generateSessionHash

public static Id generateSessionHash(java.util.Hashtable data)
Helper method to generate a hash for the keys contained in the hashtable

Parameters:
data - Hasthable containing the keys
Returns:
The NodeId hash object

generateKeyId

public static java.lang.String generateKeyId(java.util.Hashtable data)
Helper method to generate an id string

Parameters:
data - hashtable containing object data
Returns:
string containing object id