treehollow / treehollow-backend

T大树洞 的Golang后端
https://thuhole.com/
GNU Affero General Public License v3.0
167 stars 46 forks source link

配置文档sha256sum算法问题-From PKUHollow #78

Closed pkuhollow closed 3 years ago

pkuhollow commented 3 years ago

经过验证,示例配置文件中的

echo 'xxx' | sha256sum

生成hash和go生成的hash值不一样,导致校验失败

使用emn178.github.io生成的sha256sum和go生成的一致

thuhole commented 3 years ago

感谢提醒!

thuhole commented 3 years ago

fixed https://github.com/thuhole/thuhole-go-backend/commit/a2d12eb1d3e1a3ba50981c9e5ba05795a2989cf8

Alan-Liang commented 3 years ago

FYI,正确的方式应该是 echo -n 'xxx' | sha256sum,那个 -n 表示不在最后按照 UNIX 习惯加一个换行。

thuhole commented 3 years ago

FYI,正确的方式应该是 echo -n 'xxx' | sha256sum,那个 -n 表示不在最后按照 UNIX 习惯加一个换行。

你说得很有道理