HTTP Hashcash implemented in Go.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
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"