请大神解惑!!
回复 (2)
H
翻了下包的代码就是在 jwt 上再加一层签名...
function() sign{
//...
token = jwt.sign(tokendata,this.sign_key, {
expiresIn: expires,
algorithm: this.algorithm
})
//Encrypt the token
cipher = crypto.createCipher('aes192', this.encryption_key);
encrypted_token = cipher.update(token, 'utf8', 'base64');
encrypted_token += cipher.final('base64');
return encrypted_token;
}
什么是 jwt 可以参看这个 jwt.io
L
引用 hyj1991翻了下包的代码就是在 jwt 上再加一层签名... 什么是 jwt 可以参看这个 jwt.io
@hyj1991 明白了 谢谢
参与回复
登录后即可参与回复。登录