Class Sha512DigestUtils
- java.lang.Object
-
- org.springframework.security.core.token.Sha512DigestUtils
-
public abstract class Sha512DigestUtils extends java.lang.Object
Provides SHA512 digest methods.Based on Commons Codec, which does not presently provide SHA512 support.
- Since:
- 2.0.1
-
-
Constructor Summary
Constructors Constructor Description Sha512DigestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
sha(byte[] data)
Calculates the SHA digest and returns the value as abyte[]
.static byte[]
sha(java.lang.String data)
Calculates the SHA digest and returns the value as abyte[]
.static java.lang.String
shaHex(byte[] data)
Calculates the SHA digest and returns the value as a hex string.static java.lang.String
shaHex(java.lang.String data)
Calculates the SHA digest and returns the value as a hex string.
-
-
-
Method Detail
-
sha
public static byte[] sha(byte[] data)
Calculates the SHA digest and returns the value as abyte[]
.- Parameters:
data
- Data to digest- Returns:
- SHA digest
-
sha
public static byte[] sha(java.lang.String data)
Calculates the SHA digest and returns the value as abyte[]
.- Parameters:
data
- Data to digest- Returns:
- SHA digest
-
shaHex
public static java.lang.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 java.lang.String shaHex(java.lang.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
-
-