diff options
Diffstat (limited to 'libgo/go/crypto/sha1/sha1.go')
-rw-r--r-- | libgo/go/crypto/sha1/sha1.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgo/go/crypto/sha1/sha1.go b/libgo/go/crypto/sha1/sha1.go index 7bb68bbdbc8..876e7992a3a 100644 --- a/libgo/go/crypto/sha1/sha1.go +++ b/libgo/go/crypto/sha1/sha1.go @@ -17,6 +17,9 @@ func init() { // The size of a SHA1 checksum in bytes. const Size = 20 +// The blocksize of SHA1 in bytes. +const BlockSize = 64 + const ( _Chunk = 64 _Init0 = 0x67452301 @@ -53,6 +56,8 @@ func New() hash.Hash { func (d *digest) Size() int { return Size } +func (d *digest) BlockSize() int { return BlockSize } + func (d *digest) Write(p []byte) (nn int, err error) { nn = len(p) d.len += uint64(nn) |