HTTP Hashcash implemented in Go.
Go to file
AJ ONeal 1369d91375 return false by default 2020-08-25 23:24:49 -06:00
cmd/hashcash add hash subcommand 2020-08-18 01:47:23 -06:00
.gitignore add hashcash cli 2020-08-15 05:36:17 -06:00
LICENSE Initial commit 2020-08-15 08:50:08 +00:00
README.md add hash subcommand 2020-08-18 01:47:23 -06:00
go.mod initial commit 2020-08-15 04:44:24 -06:00
hashcash.go return false by default 2020-08-25 23:24:49 -06:00
hashcash_test.go initial commit 2020-08-15 04:44:24 -06:00

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"