org.cruxframework.crux.core.client.encoder
Class MD5

java.lang.Object
  extended by org.cruxframework.crux.core.client.encoder.MD5

public class MD5
extends Object

MD5 Message Digest Algorithm, as defined in RFC 1321.

Author:
Thiago da Rosa de Bustamante

Constructor Summary
MD5()
           
 
Method Summary
static String base64HmacMD5(String k, String d)
          Calculate the HMAC-MD5, of a key and some data (raw strings) and output it as a base64 string
static String base64MD5(String s)
          Generate a MD5 hash and output it as a base64 string
static String hexHmacMD5(String k, String d)
          Calculate the HMAC-MD5, of a key and some data (raw strings) and output it as an hex4 string
static String hexMD5(String s)
          Generate a MD5 hash and output it as an hex string
static String rawHmacMD5(String key, String data)
          Calculate the HMAC-MD5, of a key and some data (raw strings)
static String rawMD5(String s)
          Calculate the MD5 of a raw string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5

public MD5()
Method Detail

hexMD5

public static String hexMD5(String s)
Generate a MD5 hash and output it as an hex string

Parameters:
s - valid UTF-16 string
Returns:

base64MD5

public static String base64MD5(String s)
Generate a MD5 hash and output it as a base64 string

Parameters:
s - valid UTF-16 string
Returns:

hexHmacMD5

public static String hexHmacMD5(String k,
                                String d)
Calculate the HMAC-MD5, of a key and some data (raw strings) and output it as an hex4 string


base64HmacMD5

public static String base64HmacMD5(String k,
                                   String d)
Calculate the HMAC-MD5, of a key and some data (raw strings) and output it as a base64 string


rawHmacMD5

public static String rawHmacMD5(String key,
                                String data)
Calculate the HMAC-MD5, of a key and some data (raw strings)


rawMD5

public static String rawMD5(String s)
Calculate the MD5 of a raw string



Copyright © 2014. All rights reserved.