1、php
<?php echo md5("hello md5 你好"); // fca0127f57c8528791332645b8105bd8
2、JavaScript
// npm i js-md5 var md5 = require('js-md5') console.log(md5("hello md5 你好")); // fca0127f57c8528791332645b8105bd8
3、Python
# pip3 install md5util from md5util import md5 print(md5("hello md5 你好")); # fca0127f57c8528791332645b8105bd8
4、Java
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.14</version> </dependency>
import org.apache.commons.codec.digest.DigestUtils; public class Md5Test { public static void main(String[] args) { System.out.println(DigestUtils.md5Hex("hello md5 你好")); // fca0127f57c8528791332645b8105bd8 } }