public abstract class

Sha512DigestUtils

extends Object
java.lang.Object
   ↳ org.springframework.security.core.token.Sha512DigestUtils

Class Overview

Provides SHA512 digest methods.

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

Summary

Public Constructors
Sha512DigestUtils()
Public Methods
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(String data)
Calculates the SHA digest and returns the value as a hex string.
static String shaHex(byte[] data)
Calculates the SHA digest and returns the value as a hex string.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Sha512DigestUtils ()

Public Methods

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

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

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

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