hashcash v1.0.2
hashcash
Crystal Lang implemenation of Hashcash proof-of-work system.
Installation
-
Add the dependency to your
shard.yml
:dependencies: hashcash: github: place-labs/hashcash
-
Run
shards install
Usage
require "hashcash"
To generate a hashcash string:
Hashcash.generate("resource")
# => "1:20:201206222555:resource::pOWgc88+uDuefr/o:MTMxNzg2MA=="
To verify a hashcash string:
Hashcash.valid?("1:20:201206222555:resource::pOWgc88+uDuefr/o:MTMxNzg2MA==", "resource")
# => true
Hashcash.valid!("1:20:201206222555:resource::pOWgc88+uDuefr/o:MTMxNzg2MA==", "resource")
# => "1:20:201206222555:resource::pOWgc88+uDuefr/o:MTMxNzg2MA=="
# (or raises an exception if invalid)
Contributing
- Fork it (https://github.com/your-github-user/hashcash/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Gab Fitzgerald - creator
- Caspian Baska - maintainer
Repository
hashcash
Owner
Statistic
- 1
- 0
- 1
- 1
- 0
- over 2 years ago
- December 3, 2020
License
MIT License
Links
Synced at
Sat, 21 Dec 2024 14:51:30 GMT
Languages