Created
May 31, 2020 17:34
-
-
Save jordan-chalupka/4f2193df9ef12db70ded6eb4346eb6ae to your computer and use it in GitHub Desktop.
Using impl to create an implementation of the hash interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (Foo) Write(p []byte) (n int, err error) { | |
panic("not implemented") // TODO: Implement | |
} | |
// Sum appends the current hash to b and returns the resulting slice. | |
// It does not change the underlying hash state. | |
func (Foo) Sum(b []byte) []byte { | |
panic("not implemented") // TODO: Implement | |
} | |
// Reset resets the Hash to its initial state. | |
func (Foo) Reset() { | |
panic("not implemented") // TODO: Implement | |
} | |
// Size returns the number of bytes Sum will return. | |
func (Foo) Size() int { | |
panic("not implemented") // TODO: Implement | |
} | |
// BlockSize returns the hash's underlying block size. | |
// The Write method must be able to accept any amount | |
// of data, but it may operate more efficiently if all writes | |
// are a multiple of the block size. | |
func (Foo) BlockSize() int { | |
panic("not implemented") // TODO: Implement | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment