Commit 364e564e authored by Russ Cox's avatar Russ Cox

use fully qualified names for hash interfaces

Fixes #38.

R=r1, r
https://golang.org/cl/152072
parent d8134e73
......@@ -38,7 +38,7 @@ func (d *digest) Reset() {
d.len = 0;
}
// New returns a Hash computing the SHA1 checksum.
// New returns a hash.Hash computing the SHA1 checksum.
func New() hash.Hash {
d := new(digest);
d.Reset();
......
......@@ -40,7 +40,7 @@ func (d *digest) Reset() {
d.len = 0;
}
// New returns a Hash computing the SHA1 checksum.
// New returns a new hash.Hash computing the SHA1 checksum.
func New() hash.Hash {
d := new(digest);
d.Reset();
......
......@@ -32,7 +32,7 @@ type digest struct {
func (d *digest) Reset() { d.a, d.b = 1, 0 }
// New returns a new Hash32 computing the Adler-32 checksum.
// New returns a new hash.Hash32 computing the Adler-32 checksum.
func New() hash.Hash32 {
d := new(digest);
d.Reset();
......
......@@ -60,11 +60,11 @@ type digest struct {
tab *Table;
}
// New creates a new Hash computing the CRC-32 checksum
// New creates a new hash.Hash32 computing the CRC-32 checksum
// using the polynomial represented by the Table.
func New(tab *Table) hash.Hash32 { return &digest{0, tab} }
// NewIEEE creates a new Hash computing the CRC-32 checksum
// NewIEEE creates a new hash.Hash32 computing the CRC-32 checksum
// using the IEEE polynomial.
func NewIEEE() hash.Hash32 { return New(IEEETable) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment