Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我收到来自 pack 功能的警告,但没有任何信息。我传递的字符串似乎很好。谁能告诉我可能是什么导致了这个问题?
$s = trim(hash_hmac('sha1', trim($stringToSign), $key)); $binary_hmac = pack(“H40”, $s);
$binary_hmac 返回 false。
大概是引号:
$binary_hmac = pack(“H40”, $s); ^---^---
这些是印刷引号(例如,微软聪明但非常愚蠢的引号)。尝试切换到正常的"标准报价。
"