[![Build Status](](

# Hashcash

Elixir implementation of the hashcash algorigthm as described in and

Based loosely on

## Usage

The tests are a more complete set of examples, however:

Import a hashcash stamp

stamp = Hashcash.stamp(stamp_string)

 Verify a stamp

case Hashcash.verify(stamp,"") do
{:ok, :verified } -> :yay
{:error, :unproven} -> :work_didnt_happen
{:error, :resource_mismatch} -> :valid_resource_didnt_match
{:error, :resource_expired} -> :time_stamp_is_too_old  # 2 days

## Installation

This is not applicable, not available on Hex, but will be shortly.

If [available in Hex](, the package can be installed as:

  1. Add `hashcash` to your list of dependencies in `mix.exs`:

    def deps do
      [{:hashcash, "~> 0.1.0"}]