TUM CCSM Commons

edu.tum.cs.commons.digest
Class Digester

java.lang.Object
  extended by edu.tum.cs.commons.digest.Digester

public class Digester
extends java.lang.Object

Utility functions for creation of digests.

Version:
$Rev: 26268 $
Author:
juergens, $Author: juergens $
Rating:
GREEN Hash: 3CB40A00577C76D6DEA0297E30EEA8F7

Constructor Summary
Digester()
           
 
Method Summary
static java.lang.String createMD5Digest(java.util.Collection<java.lang.String> bases)
          Computes an MD5 hash for a collection of strings.
static java.lang.String createMD5Digest(java.lang.String base)
          Computes an MD5 hash for a string.
static java.security.MessageDigest getMD5()
          Returns Digester digester or throws an AssertionError if the Digester could not be located.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Digester

public Digester()
Method Detail

createMD5Digest

public static java.lang.String createMD5Digest(java.lang.String base)
Computes an MD5 hash for a string. The fingerprint is the digester hash of the string. It is always 32 characters long and only uses characters from [0-9A-F].


createMD5Digest

public static java.lang.String createMD5Digest(java.util.Collection<java.lang.String> bases)
Computes an MD5 hash for a collection of strings. The strings are sorted before MD5 computation, so that the resulting MD5 hash is independent of the order of the strings in the collection.


getMD5

public static java.security.MessageDigest getMD5()
Returns Digester digester or throws an AssertionError if the Digester could not be located.


TUM CCSM Commons

TUM CCSM Commons - 2.7