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

all: updateimport () and []array

This commit is contained in:
yuyi
2020-04-26 19:49:31 +08:00
committed by GitHub
parent 7b39ab6d06
commit 9f4d498ff1
59 changed files with 181 additions and 254 deletions

View File

@@ -7,9 +7,7 @@
module aes
import (
crypto.internal.subtle
)
import crypto.internal.subtle
pub const (
// The AES block size in bytes.

View File

@@ -13,10 +13,8 @@
module aes
import (
crypto.cipher
crypto.internal.subtle
)
import crypto.cipher
import crypto.internal.subtle
struct AesCbc {
mut:

View File

@@ -37,9 +37,7 @@
module aes
import (
encoding.binary
)
import encoding.binary
// Encrypt one block from src into dst, using the expanded key xk.
fn encrypt_block_generic(xk []u32, dst, src []byte) {
@@ -168,7 +166,7 @@ fn expand_key_generic(key []byte, enc mut []u32, dec mut []u32) {
}
enc[i] = binary.big_endian_u32(key[4*i..])
}
for i < enc.len {
mut t := enc[i-1]
if i%nk == 0 {

View File

@@ -4,11 +4,6 @@
module aes
import (
// crypto.cipher
// crypto.internal.subtle
)
// new_cipher_generic creates and returns a new cipher.Block
// this is the generiv v version, no arch optimisations
fn new_cipher_generic(key []byte) AesCipher {

View File

@@ -8,10 +8,8 @@
module md5
import (
math.bits
encoding.binary
)
import math.bits
import encoding.binary
fn block_generic(dig mut Digest, p []byte) {
// load state
@@ -19,7 +17,7 @@ fn block_generic(dig mut Digest, p []byte) {
mut b := dig.s[1]
mut c := dig.s[2]
mut d := dig.s[3]
for i := 0; i <= p.len-block_size; i += block_size {
mut q := p[i..]
q = q[..block_size]

View File

@@ -7,10 +7,8 @@
// Last commit: https://github.com/golang/go/commit/3ce865d7a0b88714cc433454ae2370a105210c01
module sha512
import (
crypto
encoding.binary
)
import crypto
import encoding.binary
pub const (
// size is the size, in bytes, of a SHA-512 checksum.
@@ -322,4 +320,3 @@ pub fn hexhash_512_224(s string) string {
pub fn hexhash_512_256(s string) string {
return sum512_256(s.bytes()).hex()
}