如何在Android中生成HMAC MD5? [英] How to Generate HMAC MD5 In Android?

查看:145
本文介绍了如何在Android中生成HMAC MD5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是这个领域的新的!我有这个消息和密钥,我也希望HMAC MD5使用这两个如何可能的话,如果可能的话,给一些例子或示例代码this.The给链接显示我想要的整体功能这样的代码。请帮助我。

I am new in this Field!I have this Message and Key also i want HMAC MD5 using this two so how it is possible if possible then give some example or sample code of this.The Given link display the overall functionality i want such kind of code.Please help me.

Messgae = POSTuserMon,28Jun201010:18:33GMT7FF4471B-13C0-5A9F-BB7B-7309F1AB7F08

Messgae = POSTuserMon,28Jun201010:18:33GMT7FF4471B-13C0-5A9F-BB7B-7309F1AB7F08

key = d6fc3a4a06ed55d24fecde188aaa9161

key = d6fc3a4a06ed55d24fecde188aaa9161

Link = http://hash.online-convert.com/md5-generator

推荐答案

查看 javax.crypto.Mac 类。尝试 Mac.getInstance(HmacMD5); 然后使用 init 方法, code>更新和 doFinal 方法,就像使用 MessageDigest

Look at the javax.crypto.Mac class. Try Mac.getInstance("HmacMD5"); and then use the init method with your key and then use the update and doFinal methods just as you would with a MessageDigest object.

这篇关于如何在Android中生成HMAC MD5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆