ccc.commons
Class Encryption

java.lang.Object
  extended by ccc.commons.Encryption

public final class Encryption
extends java.lang.Object

Encryption support methods.

Author:
Civic Computing Ltd.

Field Summary
static int HASH_REPETITIONS
           
static int SHA_HASH_LENGTH
           
 
Method Summary
static byte[] hash(java.lang.String string, java.lang.String salt)
          Hash a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHA_HASH_LENGTH

public static final int SHA_HASH_LENGTH
See Also:
Constant Field Values

HASH_REPETITIONS

public static final int HASH_REPETITIONS
See Also:
Constant Field Values
Method Detail

hash

public static byte[] hash(java.lang.String string,
                          java.lang.String salt)
Hash a string.

Parameters:
string - The string to hash.
salt - The salt to use for hashing.
Returns:
The hashed string as a byte array.


Copyright © 2010. All Rights Reserved.