Example usage for org.springframework.util DigestUtils appendMd5DigestAsHex

List of usage examples for org.springframework.util DigestUtils appendMd5DigestAsHex

Introduction

In this page you can find the example usage for org.springframework.util DigestUtils appendMd5DigestAsHex.

Prototype

public static StringBuilder appendMd5DigestAsHex(InputStream inputStream, StringBuilder builder)
        throws IOException 

Source Link

Document

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

Usage

From source file:io.spring.initializr.web.project.MainController.java

private String createUniqueId(String content) {
    StringBuilder builder = new StringBuilder();
    DigestUtils.appendMd5DigestAsHex(content.getBytes(StandardCharsets.UTF_8), builder);
    return builder.toString();
}