1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

update []

This commit is contained in:
Alexander Medvednikov
2019-11-14 09:53:05 +03:00
parent 4a833d8151
commit 96b530cf85
7 changed files with 41 additions and 40 deletions

View File

@ -67,7 +67,7 @@ pub fn (d mut Digest) write(p_ []byte) int {
d.nx = 0
}
if n >= p.len {
p = []byte
p = []
} else {
p = p[n..]
}
@ -76,7 +76,7 @@ pub fn (d mut Digest) write(p_ []byte) int {
n := p.len &~ (block_size - 1)
block(mut d, p[..n])
if n >= p.len {
p = []byte
p = []
} else {
p = p[n..]
}

View File

@ -8,7 +8,7 @@
// applications.
// Based off: https://github.com/golang/go/blob/master/src/crypto/sha1
// Last commit: https://github.com/golang/go/commit/3ce865d7a0b88714cc433454ae2370a105210c01
// Last commit: https://github.com/golang/go/commit/3ce865d7a0b88714cc433454ae2370a105210c01
module sha1
@ -71,7 +71,7 @@ pub fn (d mut Digest) write(p_ []byte) int {
d.nx = 0
}
if n >= p.len {
p = []byte
p = []
} else {
p = p[n..]
}
@ -80,7 +80,7 @@ pub fn (d mut Digest) write(p_ []byte) int {
n := p.len &~ (chunk - 1)
block(d, p[..n])
if n >= p.len {
p = []byte
p = []
} else {
p = p[n..]
}

View File

@ -163,7 +163,7 @@ fn (d mut Digest) write(p_ []byte) int {
d.nx = 0
}
if n >= p.len {
p = []byte
p = []
} else {
p = p[n..]
}
@ -172,7 +172,7 @@ fn (d mut Digest) write(p_ []byte) int {
n := p.len &~ (Chunk - 1)
block(mut d, p[..n])
if n >= p.len {
p = []byte
p = []
} else {
p = p[n..]
}