summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/sha256/sha256.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/crypto/sha256/sha256.go')
-rw-r--r--src/pkg/crypto/sha256/sha256.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pkg/crypto/sha256/sha256.go b/src/pkg/crypto/sha256/sha256.go
index df00a7298..57a8ffa0d 100644
--- a/src/pkg/crypto/sha256/sha256.go
+++ b/src/pkg/crypto/sha256/sha256.go
@@ -112,10 +112,7 @@ func (d *digest) Write(p []byte) (nn int, err os.Error) {
n := _Block(d, p)
p = p[n:]
if len(p) > 0 {
- for i, x := range p {
- d.x[i] = x
- }
- d.nx = len(p)
+ d.nx = copy(d.x[:], p)
}
return
}