anon.crypto.tinytls.util
Class hash

java.lang.Object
  extended by anon.crypto.tinytls.util.hash

public class hash
extends java.lang.Object

Author:
stefan this class implements often used hash functions

Constructor Summary
hash()
           
 
Method Summary
static byte[] md5(byte[] b1)
          generates a md5 hash
static byte[] md5(byte[] b1, byte[] b2)
          generates a md5 hash
static byte[] md5(byte[] b1, byte[] b2, byte[] b3)
          generates a md5 hash
static byte[] sha(byte[] b1)
          generates a sha hash
static byte[] sha(byte[] b1, byte[] b2)
          generates a sha hash
static byte[] sha(byte[] b1, byte[] b2, byte[] b3)
          generates a sha hash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

hash

public hash()
Method Detail

sha

public static byte[] sha(byte[] b1)
generates a sha hash

Parameters:
inputs - input
Returns:
hash

sha

public static byte[] sha(byte[] b1,
                         byte[] b2)
generates a sha hash

Parameters:
b1 - input
b2 - input
Returns:
hash

sha

public static byte[] sha(byte[] b1,
                         byte[] b2,
                         byte[] b3)
generates a sha hash

Parameters:
b1 - input
b2 - input
b3 - input
Returns:
hash

md5

public static byte[] md5(byte[] b1)
generates a md5 hash

Parameters:
inputs - input
Returns:
hash

md5

public static byte[] md5(byte[] b1,
                         byte[] b2)
generates a md5 hash

Parameters:
b1 - input
b2 - input
Returns:
hash

md5

public static byte[] md5(byte[] b1,
                         byte[] b2,
                         byte[] b3)
generates a md5 hash

Parameters:
b1 - input
b2 - input
b3 - input
Returns:
hash