当前位置:网站首页>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
边栏推荐
猜你喜欢

Interface anti duplicate submission

Flink CDC (MySQL as an example)

小程序开发系统有哪些优点?为什么要选择它?

【4】 Redis persistence (RDB and AOF)

Data warehouse tool superset installation (fully available)

Service reliability guarantee -watchdog

matplotlib数据可视化

Regular verification rules of wechat applet mobile number

小程序开发哪家更靠谱呢?

记录下在线扩容服务器遇到的问题 NOCHANGE: partition 1 is size 419428319. it cannot be grown
随机推荐
面试官:让你设计一套图片加载框架,你会怎么设计?
The project does not report an error, operates normally, and cannot request services
字节Android岗4轮面试,收到 50k*18 Offer,裁员风口下成功破局
On how digital collections and entities can empower each other
Briefly understand MVC and three-tier architecture
MySQL view, stored procedure and stored function
Kotlin语言现在怎么不火了?你怎么看?
分布式锁-数据库实现
Continuous login problem
区分实时数据、离线数据、流式数据以及批量数据的区别
Bert的使用方法
NLP中基于Bert的数据预处理
Single line function, aggregate function after class exercise
The combination of cultural tourism and digital collections has a significant effect, but how to support users' continuous purchasing power
ModuleNotFoundError: No module named ‘pip‘
Redis 主从架构的搭建
Notice of attack: [bean Bingbing] send, sell, cash, draw, prize, etc
Chapter 8 aggregate function
【一】redis简介
CertPathValidatorException:validity check failed