Skip to content
An implementation of the SHA-256d hash for the Go programming language.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
COPYING initial revision Jul 15, 2013
README.rst Fix the use of ReST for code sniplets Jul 15, 2013
sha256d.go cosmetic fix: rename old h1 and h2 to new round1 and round2 Jul 20, 2013
sha256d_test.go add more benchmarking functions Jul 20, 2013



An implementation of the SHA-256d hash for the Go programming language.

Copyright (C) 2013 Jochen Voss

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The homepage of this package is at . Please send any comments or bug reports to the program's author, Jochen Voss <> .


This package provides an implementation of the SHA-256d hash algorithm (also known as "double SHA-256") for the Go programming language. SHA-256d is a cryptographic hash, first proposed by Ferguson and Schneier in the book "Practical Cryptography". The SHA-256d hash is used in the Bitcoin protocol and in the Fortuna random number generator.

The SHA-256d hash is obtained by applying the SHA-256 hash twice, i.e. by first applying SHA-256 to the data and then again to the resulting hash.


go get


The sha256d package implements the standard hash.Hash interface. Example:

hash := sha256d.New()
n, _ := hash.Write([]byte("hello"))
hashVal := hash.Sum(nil)
You can’t perform that action at this time.