aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/crypto/md5/md5.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/crypto/md5/md5.go')
-rw-r--r--libgo/go/crypto/md5/md5.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/libgo/go/crypto/md5/md5.go b/libgo/go/crypto/md5/md5.go
index 7aeee60..88d914d 100644
--- a/libgo/go/crypto/md5/md5.go
+++ b/libgo/go/crypto/md5/md5.go
@@ -64,7 +64,7 @@ func (d *digest) MarshalBinary() ([]byte, error) {
b = appendUint32(b, d.s[2])
b = appendUint32(b, d.s[3])
b = append(b, d.x[:d.nx]...)
- b = b[:len(b)+len(d.x)-int(d.nx)] // already zero
+ b = b[:len(b)+len(d.x)-d.nx] // already zero
b = appendUint64(b, d.len)
return b, nil
}
@@ -160,10 +160,10 @@ func (d *digest) Write(p []byte) (nn int, err error) {
return
}
-func (d0 *digest) Sum(in []byte) []byte {
- // Make a copy of d0 so that caller can keep writing and summing.
- d := *d0
- hash := d.checkSum()
+func (d *digest) Sum(in []byte) []byte {
+ // Make a copy of d so that caller can keep writing and summing.
+ d0 := *d
+ hash := d0.checkSum()
return append(in, hash[:]...)
}