Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use libsodium #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

use libsodium #1

wants to merge 1 commit into from

Conversation

SmartHypercube
Copy link

将 token 换成 libsodium 生成的签名(含消息明文)的十六进制表示。好处:

  • 避免和难用且危险的 openssl 打交道
  • 不用搞无意义的 cert,只需要一对公私钥
  • 不用手工拆解 id 和签名
  • token 验证逻辑在其他语言中更易于实现,避免出错
  • 避免选手因为 base64 字符问题被坑
  • token 是确定性的,一个人只对应一个 token

@SmartHypercube
Copy link
Author

这个 PR 被 merge 后我会相应更新 Hackergame 平台相关代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant