public abstract class

DigestUtils

extends Object
java.lang.Object
   ↳ org.springframework.util.DigestUtils

Class Overview

Miscellaneous methods for calculating digests.

Mainly for internal use within the framework; consider Apache Commons Codec for a more comprehensive suite of digest utilities.

See Also
  • org.apache.commons.codec.digest.DigestUtils

Summary

Public Constructors
DigestUtils()
Public Methods
static StringBuilder appendMd5DigestAsHex(byte[] bytes, StringBuilder builder)
Append a hexadecimal string representation of the MD5 digest of the given bytes to the given StringBuilder.
static byte[] md5Digest(byte[] bytes)
Calculate the MD5 digest of the given bytes.
static String md5DigestAsHex(byte[] bytes)
Return a hexadecimal string representation of the MD5 digest of the given bytes.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DigestUtils ()

Also: SpringCore

Public Methods

public static StringBuilder appendMd5DigestAsHex (byte[] bytes, StringBuilder builder)

Also: SpringCore

Append a hexadecimal string representation of the MD5 digest of the given bytes to the given StringBuilder.

Parameters
bytes the bytes to calculate the digest over
builder the string builder to append the digest to
Returns
  • the given string builder

public static byte[] md5Digest (byte[] bytes)

Also: SpringCore

Calculate the MD5 digest of the given bytes.

Parameters
bytes the bytes to calculate the digest over
Returns
  • the digest

public static String md5DigestAsHex (byte[] bytes)

Also: SpringCore

Return a hexadecimal string representation of the MD5 digest of the given bytes.

Parameters
bytes the bytes to calculate the digest over
Returns
  • a hexadecimal digest string