$hash = hash_hmac(‘sha256’,$all,$secret);
我尝试使用下面的代码但是徒劳无功.价值观是不同的.
use Digest::SHA; $sha = Digest::SHA->new('sha256'); $sha->add($secret); $sha->add($all); $digest = $sha->hexdigest;
问候,帕文
use Digest::SHA qw(hmac_sha256_hex); $digest=hmac_sha256_hex($all,$secret);
希望能帮助到你.