import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.security.MessageDigest; public class MD5WLBUtil
{
public static byte[] md54wlb(final byte[] binaryData) throws NoSuchAlgorithmException, UnsupportedEncodingException {
final MessageDigest md = MessageDigest.getInstance("MD5");
md.update(binaryData);
final byte[] b = md.digest();
final StringBuffer buf = new StringBuffer("");
for (int offset = 0; offset < b.length; ++offset) {
int i = b[offset];
if (i < 0) {
i += 256;
}
if (i < 16) {
buf.append("0");
}
buf.append(Integer.toHexString(i));
}
return buf.toString().getBytes();
}
}

MD5WLBUtil的更多相关文章

随机推荐

  1. POJ1112 Team Them Up!

    Team them up! Input file teams.in Output file teams.out Your task is to divide a number of persons i ...

  2. Trilead,SSH2的Java调用

    最近项目要部署10台设备,如果每台设备都手动进行部署想想也是醉了. 因为之前一直使用SecurityFX以及SecurityCRT,所以考虑是否可以使用基于SSH2的类库来实现文件拷贝以及远程命令调用 ...

  3. 转:删除redis所有KEY

    转自:http://ssuupv.blog.163.com/blog/static/1461567220135610456193/ 批量删除Key Redis 中有删除单个 Key 的指令 DEL,但 ...

  4. Logstash 2.0.0 beta2 发布,开源日志管理

    Logstash 是一个应用程序日志.事件的传输.处理.管理和搜索的平台.你可以用它来统一对应用程序日志进行收集管理,提供 Web 接口用于查询和统计. Logstash 现在是 ElasticSea ...

  5. 【转】Pro Android学习笔记(四六):Dialog(3):对话框弹对话框

    目录(?)[-] 帮助提示框的实现 实现再弹框 再谈fragment管理器 提示框的按钮Help,将触发弹出新的帮助提示框. 帮助提示框的实现 帮助提示框的实现很简单,利用重写onCreateView ...

  6. C语言学习笔记--void关键字

    1.C语言中Void关键字的含义 void 修饰函数返回值和参数——为了表示“无”,如果函数没有返回值,那么应该将其声明为 void,同样的,如果函数没有参数,也应该声明其参数为 void //f() ...

  7. SpringMVC 学习笔记(文件的上传和下载)

    在web项目中会遇到的问题:文件上传 文件上传在前端页面的设置:form表单 设置 input 类型 文件上传的请求方式要使用post,要将enctype设置为multipart/form-data ...

  8. 292C Beautiful IP Addresses

    传送门 题目 The problem uses a simplified TCP/IP address model, please read the statement carefully. An I ...

  9. StringBuffer输出

    public class Test { public static void main(String[] args) { StringBuffer a = new StringBuffer(" ...

  10. NPM run start使用本地的http-server

    在项目开发过程中,Visual Studio 2015 一个Solution中有一个前端项目 Myproject.FrontEnd,我们使用node.js, npm来进行管理 在这个项目中,有一个pa ...