func BenchmarkHundredMillionTimeFastSHA256(b *testing.B) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxhundredmillion"))
	hashFunction := fastsha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(100000000)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		b.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		b.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		b.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
Doing this to see how much a better algo makes a difference (figure out if the bottleneck is Read/Write speed)
package hashtimelock
import (
	"bytes"
	"crypto/rand"
	"crypto/sha256"
	"testing"
	"github.com/btcsuite/fastsha256"
	"github.com/dchest/siphash"
	"github.com/minio/highwayhash"
	"golang.org/x/crypto/blake2b"
	"golang.org/x/crypto/sha3"
)
func TestZeroTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxzero"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(0)
	puzzle, _, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, seed) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, seed, puzzleAns)
	}
}
func TestOneTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxone"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(1)
	puzzle, _, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	testSHA := sha256.New()
	if _, err = testSHA.Write(seed); err != nil {
		t.Fatalf("Could not write to hash function: %s\n", err)
	}
	seedSum := testSHA.Sum(nil)
	if !bytes.Equal(puzzleAns, seedSum) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, seedSum, puzzleAns)
	}
}
func TestTenTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxten"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(10)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
func TestHundredTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxhundred"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(100)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
func TestThousandTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxthousand"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(1000)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
func TestTenThousandTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxtenthousand"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(10000)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
func TestHundredThousandTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxhundredthousand"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(100000)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
func TestMillionTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxmillion"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(1000000)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
func TestTenMillionTimeSHA256(t *testing.T) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxtenmillion"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(10000000)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		t.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		t.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		t.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}
func BenchmarkHundredMillionTimeSHA256(b *testing.B) {
	seed := make([]byte, 32)
	copy(seed[:], []byte("opencxhundredmillion"))
	hashFunction := sha256.New()
	hashPuzzle, _ := New(seed, hashFunction)
	time := uint64(100000000)
	puzzle, expectedAns, err := hashPuzzle.SetupTimelockPuzzle(time)
	if err != nil {
		b.Fatalf("There was an error setting up the timelock puzzle: %s\n", err)
	}
	puzzleAns, err := puzzle.Solve()
	if err != nil {
		b.Fatalf("Error solving puzzle: %s\n", err)
	}
	if !bytes.Equal(puzzleAns, expectedAns) {
		b.Fatalf("Answer did not equal puzzle for time = %d. Expected %x, got %x\n", time, expectedAns, puzzleAns)
	}
}