diff options
Diffstat (limited to 'libgo/go/crypto/sha512/sha512.go')
-rw-r--r-- | libgo/go/crypto/sha512/sha512.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgo/go/crypto/sha512/sha512.go b/libgo/go/crypto/sha512/sha512.go index 927f28a..a245fd6 100644 --- a/libgo/go/crypto/sha512/sha512.go +++ b/libgo/go/crypto/sha512/sha512.go @@ -22,6 +22,9 @@ const Size = 64 // The size of a SHA384 checksum in bytes. const Size384 = 48 +// The blocksize of SHA512 and SHA384 in bytes. +const BlockSize = 128 + const ( _Chunk = 128 _Init0 = 0x6a09e667f3bcc908 @@ -97,6 +100,8 @@ func (d *digest) Size() int { return Size384 } +func (d *digest) BlockSize() int { return BlockSize } + func (d *digest) Write(p []byte) (nn int, err error) { nn = len(p) d.len += uint64(nn) |