编程知识 cdmana.com

Java: org.apache.commons . codec.digest.DigestUtils Calculate the MD5 value

rely on

<dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>1.10</version>
</dependency>

Calculation MD5 value

import org.apache.commons.codec.digest.DigestUtils;

public class CodeDemo {
    
    public static void main(String[] args) {
    
        System.out.println(DigestUtils.md5Hex("hello"));
        // 5d41402abc4b2a76b9719d911017c592
    }
}

版权声明
本文为[Peng Shiyu]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224171911708E.html

Scroll to Top