public static String generateShaHash(String text) {
		try {
			MessageDigest digest = MessageDigest.getInstance(SHA_ALGORITHM);
			byte[] bytes = text.getBytes(UTF_8);
			bytes = digest.digest(bytes);
			return toHexEncode(bytes);
		} catch (Exception e) {
			throw new UnexpectedException(e);
		}
	}
public static String generateShaHash ( String text ) { try { MessageDigest digest = MessageDigest . getInstance ( SHA_ALGORITHM ) ; byte [ ] bytes = text . getBytes ( UTF_8 ) ; bytes = digest . digest ( bytes ) ; return toHexEncode ( bytes ) ; } catch ( Exception e ) { throw new UnexpectedException ( e ) ; } }
Generates the SHA hash for the input string.

@param text the input string to hash
@return the hash for the input string in hexadecimal encoding