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:
@@ -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')
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user