1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-25 11:35:34 -05:00

format code

This commit is contained in:
V2Ray
2015-09-08 18:21:33 +02:00
parent 86944af2ff
commit 099015021e
4 changed files with 39 additions and 39 deletions

View File

@@ -3,7 +3,7 @@ package vmess
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/cipher"
"crypto/rand"
mrand "math/rand"
"testing"
@@ -27,17 +27,17 @@ func TestNormalReading(t *testing.T) {
keySize := 16
key := make([]byte, keySize)
randomBytes(key, t)
iv := make([]byte, keySize)
randomBytes(iv, t)
iv := make([]byte, keySize)
randomBytes(iv, t)
aesBlock, err := aes.NewCipher(key)
if err != nil {
t.Fatal(err)
}
aesMode := cipher.NewCBCEncrypter(aesBlock, iv)
aesMode := cipher.NewCBCEncrypter(aesBlock, iv)
ciphertext := make([]byte, testSize)
aesMode.CryptBlocks(ciphertext, plaintext)
aesMode.CryptBlocks(ciphertext, plaintext)
ciphertextcopy := make([]byte, testSize)
copy(ciphertextcopy, ciphertext)