hashcash/README.md

43 lines
688 B
Markdown
Raw Permalink Normal View History

2020-08-15 08:50:08 +00:00
# hashcash
2020-08-15 10:44:24 +00:00
HTTP Hashcash implemented in Go.
Explanation at https://therootcompany.com/blog/http-hashcash/
2020-08-15 11:41:03 +00:00
Go API docs at https://pkg.go.dev/git.rootprojects.org/root/hashcash?tab=doc
2020-08-15 11:36:17 +00:00
# CLI Usage
Install:
```bash
go get git.rootprojects.org/root/hashcash/cmd/hashcash
```
Usage:
```txt
Usage:
hashcash new [subject *] [expires in 5m] [difficulty 10]
hashcash parse <hashcash>
hashcash solve <hashcash>
2020-08-18 07:47:23 +00:00
hashcash hash <hashcash>
2020-08-15 11:36:17 +00:00
hashcash verify <hashcash> [subject *]
```
Example:
```bash
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"
```