当前位置:网站首页>Quick look-up table to MD5
Quick look-up table to MD5
2022-07-28 06:06:00 【Alex_ z0897】
Generate md5 And the output 16 Base number , Unified java,python,dart Between md5 check
java-spring
System.out.println(org.springframework.util.DigestUtils.md5DigestAsHex("asdf".getBytes()));
public abstract class DigestUtils {
// A little ... Irrelevant code
private static final char[] HEX_CHARS = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
// Generate md5 encode by 16 Base number , abbreviation hex
private static char[] encodeHex(byte[] bytes) {
char[] chars = new char[32];
for(int i = 0; i < chars.length; i += 2) {
byte b = bytes[i / 2];
chars[i] = HEX_CHARS[b >>> 4 & 15]; //0xf0 = 15
chars[i + 1] = HEX_CHARS[b & 15];
}
return chars;
}
}
python
import hashlib
print hashlib.md5("asdf").hexdigest()
dart
import 'dart:convert';
import "package:crypto/crypto.dart";
var md = md5.convert(utf8.encode('asdf'));
print(md.toString());
Improved version MD5 Generate hexadecimal string
High and low order of bytes
边栏推荐
- Installing redis under Linux (centos7)
- 【六】redis缓存策略
- Installation and use of flinkx
- Distributed cluster architecture scenario optimization solution: distributed ID solution
- Hit your face ins? Mars digital collection platform explores digital collection light social networking
- 分布式集群架构场景优化解决方案:分布式ID解决方案
- 【5】 Redis master-slave synchronization and redis sentinel (sentinel)
- Dataset类分批加载数据集
- 用于排序的sort方法
- Linux(centOs7) 下安装redis
猜你喜欢
随机推荐
Distributed cluster architecture scenario optimization solution: distributed ID solution
JS simple publish and subscribe class
小程序开发
分布式锁-Redis实现
Assembly打包
小程序制作小程序开发适合哪些企业?
分布式集群架构场景优化解决方案:Session共享问题
微服务架构认知、服务治理-Eureka
速查表之转MD5
简单理解一下MVC和三层架构
MySQL练习题50道+答案
Continuous login problem
手撸一个简单的RPC(<-_<-)
1: Why should databases be divided into databases and tables
分布式集群架构场景优化解决方案:分布式ID解决方案
At the moment of the epidemic, online and offline travelers are trapped. Can the digital collection be released?
MySQL view, stored procedure and stored function
Xshell suddenly failed to connect to the virtual machine
Digital collections "chaos", 100 billion market change is coming?
tensorboard可视化








