mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
compiler/vlib: replace substr/left/right with [start..end]
everywhere
This commit is contained in:
parent
ed55826686
commit
59378dce46
49 changed files with 308 additions and 306 deletions
|
@ -14,8 +14,8 @@ fn test_crypto_aes() {
|
|||
if ciphertext.len < aes.block_size {
|
||||
panic('ciphertext too short')
|
||||
}
|
||||
iv := ciphertext.left(aes.block_size)
|
||||
ciphertext = ciphertext.right(aes.block_size)
|
||||
iv := ciphertext[..aes.block_size]
|
||||
ciphertext = ciphertext[aes.block_size..]
|
||||
// CBC mode always works in whole blocks.
|
||||
if ciphertext.len%aes.block_size != 0 {
|
||||
panic('ciphertext is not a multiple of the block size')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue