HTTP Hashcash implemented in Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AJ ONeal 1369d91375 return false by default пре 4 година
cmd/hashcash add hash subcommand пре 4 година
.gitignore add hashcash cli пре 4 година
LICENSE Initial commit пре 4 година
README.md add hash subcommand пре 4 година
go.mod initial commit пре 4 година
hashcash.go return false by default пре 4 година
hashcash_test.go initial commit пре 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"