[英]How to pass number to crypto-js hmac sha1 method?
I have different results in java and js code when using HmacSha1
method.使用
HmacSha1
方法时,我在 java 和 js 代码中有不同的结果。 after spend time to searching, I found that maybe my message should passed as a number to HmacSha1
method.花时间搜索后,我发现我的消息可能应该作为数字传递给
HmacSha1
方法。 so how to do this?那么怎么做呢? this is my code :
这是我的代码:
import Crypto from "crypto-js";
Crypto.HmacSHA1(
"26056085",
Crypto.enc.Hex.parse("0899917B8146FFE4")
);
so, how to send "26056085"
as a number message?那么,如何将
"26056085"
作为数字消息发送? Also i know that this method parameters accepts string type.我也知道这个方法参数接受字符串类型。 maybe this link can help you for help me.
也许这个链接可以帮助你帮助我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.