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