您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
AJ ONeal
1369d91375
|
4 年前 | |
---|---|---|
cmd/hashcash | 4 年前 | |
.gitignore | 4 年前 | |
LICENSE | 4 年前 | |
README.md | 4 年前 | |
go.mod | 4 年前 | |
hashcash.go | 4 年前 | |
hashcash_test.go | 4 年前 |
README.md
hashcash
HTTP Hashcash implemented in Go.
Explanation at https://therootcompany.com/blog/http-hashcash/
Go API docs at https://pkg.go.dev/git.rootprojects.org/root/hashcash?tab=doc
CLI Usage
Install:
go get git.rootprojects.org/root/hashcash/cmd/hashcash
Usage:
Usage:
hashcash new [subject *] [expires in 5m] [difficulty 10]
hashcash parse <hashcash>
hashcash solve <hashcash>
hashcash hash <hashcash>
hashcash verify <hashcash> [subject *]
Example:
my_hc=$(hashcash new)
echo New: $my_hc
hashcash parse "$my_hc"
echo ""
my_hc=$(hashcash solve "$my_hc")
echo Solved: $my_hc
hashcash parse "$my_hc"
echo ""
hashcash verify "$my_hc"