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

all: change f mut Foo to mut f Foo

This commit is contained in:
yuyi
2020-06-04 16:35:40 +08:00
committed by GitHub
parent 0b7fe0a9d0
commit 5ae8853648
36 changed files with 62 additions and 65 deletions

View File

@@ -46,7 +46,7 @@ pub fn new_cbc(b AesCipher, iv []byte) AesCbc {
pub fn (x &AesCbc) block_size() int { return x.block_size }
pub fn (x &AesCbc) encrypt_blocks(dst mut []byte, src_ []byte) {
pub fn (x &AesCbc) encrypt_blocks(mut dst []byte, src_ []byte) {
mut src := src_
if src.len%x.block_size != 0 {
panic('crypto.cipher: input not full blocks')
@@ -79,7 +79,7 @@ pub fn (x &AesCbc) encrypt_blocks(dst mut []byte, src_ []byte) {
copy(x.iv, iv)
}
pub fn (mut x AesCbc) decrypt_blocks(dst mut []byte, src []byte) {
pub fn (mut x AesCbc) decrypt_blocks(mut dst []byte, src []byte) {
if src.len%x.block_size != 0 {
panic('crypto.cipher: input not full blocks')
}

View File

@@ -156,7 +156,7 @@ fn rotw(w u32) u32 { return (w<<8) | (w>>24) }
// Key expansion algorithm. See FIPS-197, Figure 11.
// Their rcon[i] is our powx[i-1] << 24.
fn expand_key_generic(key []byte, enc mut []u32, dec mut []u32) {
fn expand_key_generic(key []byte, mut enc []u32, mut dec []u32) {
// Encryption key setup.
mut i := 0
nk := key.len / 4