Spring Security Framework

org.springframework.security.util
Class Sha512DigestUtils

java.lang.Object
  extended by org.springframework.security.util.Sha512DigestUtils

public abstract class Sha512DigestUtils
extends Object

Provides SHA512 digest methods.

Based on Commons Codec, which does not presently provide SHA512 support.

Since:
2.0.1
Author:
Ben Alex

Constructor Summary
Sha512DigestUtils()
           
 
Method Summary
static byte[] sha(byte[] data)
          Calculates the SHA digest and returns the value as a byte[].
static byte[] sha(String data)
          Calculates the SHA digest and returns the value as a byte[].
static String shaHex(byte[] data)
          Calculates the SHA digest and returns the value as a hex string.
static String shaHex(String data)
          Calculates the SHA digest and returns the value as a hex string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sha512DigestUtils

public Sha512DigestUtils()
Method Detail

sha

public static byte[] sha(byte[] data)
Calculates the SHA digest and returns the value as a byte[].

Parameters:
data - Data to digest
Returns:
SHA digest

sha

public static byte[] sha(String data)
Calculates the SHA digest and returns the value as a byte[].

Parameters:
data - Data to digest
Returns:
SHA digest

shaHex

public static String shaHex(byte[] data)
Calculates the SHA digest and returns the value as a hex string.

Parameters:
data - Data to digest
Returns:
SHA digest as a hex string

shaHex

public static String shaHex(String data)
Calculates the SHA digest and returns the value as a hex string.

Parameters:
data - Data to digest
Returns:
SHA digest as a hex string

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.