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

vlib: fix mutable args

This commit is contained in:
joe-conigliaro
2019-08-07 17:53:33 +10:00
committed by Alexander Medvednikov
parent 34e0b164eb
commit 0bcc53c366
13 changed files with 54 additions and 54 deletions

View File

@ -87,10 +87,10 @@ fn encrypt_block_generic(xk []u32, dst, src []byte) {
s3 ^= xk[k+3]
_ = dst[15] // early bounds check
binary.big_endian_put_u32(dst.left(4), s0)
binary.big_endian_put_u32(dst.slice(4, 8), s1)
binary.big_endian_put_u32(dst.slice(8, 12), s2)
binary.big_endian_put_u32(dst.slice(12, 16), s3)
binary.big_endian_put_u32(mut dst.left(4), s0)
binary.big_endian_put_u32(mut dst.slice(4, 8), s1)
binary.big_endian_put_u32(mut dst.slice(8, 12), s2)
binary.big_endian_put_u32(mut dst.slice(12, 16), s3)
}
// Decrypt one block from src into dst, using the expanded key xk.
@ -141,10 +141,10 @@ fn decrypt_block_generic(xk []u32, dst, src []byte) {
s3 ^= xk[k+3]
_ = dst[15] // early bounds check
binary.big_endian_put_u32(dst.left(4), s0)
binary.big_endian_put_u32(dst.slice(4, 8), s1)
binary.big_endian_put_u32(dst.slice(8, 12), s2)
binary.big_endian_put_u32(dst.slice(12, 16), s3)
binary.big_endian_put_u32(mut dst.left(4), s0)
binary.big_endian_put_u32(mut dst.slice(4, 8), s1)
binary.big_endian_put_u32(mut dst.slice(8, 12), s2)
binary.big_endian_put_u32(mut dst.slice(12, 16), s3)
}
// Apply SBox0 to each byte in w.