- 使用消息认证码而不是单向散列函数,即使用hmac(data, key)而不是hash(data+key)
- 使用安全的Hash函数,即选择SHA-2、SHA-3等,而不是MD5等
- 防止密钥推测攻击,密钥使用密码学安全的、高强度的伪随机数生成器生成,至少32字符
- 防止重放攻击,使用nonce等方式
Created
December 27, 2018 03:11
-
-
Save codethereforam/7e3879aebcde289779ebe8715e4f30be to your computer and use it in GitHub Desktop.
使用API key做接口签名校验
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment