欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

谁在说PHP垃圾我跟谁看看以下代码谁牛B?

程序员文章站 2022-06-14 20:26:29
...
Java代码
public static String getMD5(String orgin, String charset) {	if (charset == null) charset = "utf-8";	String result = null;	try {		MessageDigest md = MessageDigest.getInstance("MD5");		result = byte2hex(md.digest(orgin.getBytes(charset)));	} catch (Exception e) {		throw new java.lang.RuntimeException("sign error !", e);	}	return result;}private static String byte2hex(byte[] b){	StringBuffer hs = new StringBuffer(); 	String stmp = ""; 	for (int n = 0; n   

PHP代码

$reSign = base64_encode(md5($data.$secret))