.net和Java代码转化,下面这段代码如何转化成Java代码

byte[]bytes=System.Text.Encoding.UTF8.GetBytes(password);byte[]result;System.Security... byte[] bytes = System.Text.Encoding.UTF8.GetBytes(password);
byte[] result;
System.Security.Cryptography.SHA512 shaM = new System.Security.Cryptography.SHA512Managed();
result = shaM.ComputeHash(bytes);
int i = 0;
while (i++ < 512) {
result = shaM.ComputeHash(result);
}
shaM.Clear();
return Convert.ToBase64String(result);
这个是java中报的错
展开
 我来答
o495528314
2015-11-04 · TA获得超过1182个赞
知道小有建树答主
回答量:257
采纳率:75%
帮助的人:37.5万
展开全部
System.Security.Cryptography.SHA512 shaM = new System.Security.Cryptography.SHA512Managed(); 是个类是.net的类,要java中也有相关类要自己去写。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式