diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index ae2be37abc..00c70eada7 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -259,7 +259,7 @@ pub fn (b []byte) hex() string { mut hex := malloc(b.len*2+1) mut ptr := &hex[0] for i := 0; i < b.len ; i++ { - ptr += C.sprintf(ptr, '%02X', b[i]) + ptr += C.sprintf(ptr, '%02x', b[i]) } return string(hex) } diff --git a/vlib/crypto/aes/aes_test.v b/vlib/crypto/aes/aes_test.v index ab18adbe7b..f187f0fdf7 100644 --- a/vlib/crypto/aes/aes_test.v +++ b/vlib/crypto/aes/aes_test.v @@ -23,5 +23,5 @@ fn test_crypto_aes() { mode := aes.new_cbc(block, iv) mode.encrypt_blocks(ciphertext, ciphertext) - assert ciphertext.hex() == 'C210459B514668DDC44674885E4979215265A6C44431A248421254EF357A8C2A308A8BDDF5623AF9DF91737562041CF1' + assert ciphertext.hex() == 'c210459b514668ddc44674885e4979215265a6c44431a248421254ef357a8c2a308a8bddf5623af9df91737562041cf1' } diff --git a/vlib/crypto/md5/md5_test.v b/vlib/crypto/md5/md5_test.v index e5dbd08299..aa2ee62c4b 100644 --- a/vlib/crypto/md5/md5_test.v +++ b/vlib/crypto/md5/md5_test.v @@ -5,5 +5,5 @@ import crypto.md5 fn test_crypto_md5() { - assert md5.sum('this is a md5 checksum.'.bytes()).hex() == '6FB421FF99036547655984DA12973431' + assert md5.sum('this is a md5 checksum.'.bytes()).hex() == '6fb421ff99036547655984da12973431' } diff --git a/vlib/crypto/rc4/rc4_test.v b/vlib/crypto/rc4/rc4_test.v index 2c792fa46f..820bd0d584 100644 --- a/vlib/crypto/rc4/rc4_test.v +++ b/vlib/crypto/rc4/rc4_test.v @@ -19,5 +19,5 @@ fn test_crypto_rc4() { c.reset() - assert src.hex() == '189A39A91AEA8AFA65' + assert src.hex() == '189a39a91aea8afa65' } diff --git a/vlib/crypto/sha1/sha1_test.v b/vlib/crypto/sha1/sha1_test.v index 3e95cb6525..9f5f611b7c 100644 --- a/vlib/crypto/sha1/sha1_test.v +++ b/vlib/crypto/sha1/sha1_test.v @@ -5,5 +5,5 @@ import crypto.sha1 fn test_crypto_sha1() { - assert sha1.sum('This is a sha1 checksum.'.bytes()).hex() == 'E100D74442FAA5DCD59463B808983C810A8EB5A1' + assert sha1.sum('This is a sha1 checksum.'.bytes()).hex() == 'e100d74442faa5dcd59463b808983c810a8eb5a1' } diff --git a/vlib/crypto/sha256/sha256_test.v b/vlib/crypto/sha256/sha256_test.v index 144158e4f2..282bbfa2ce 100644 --- a/vlib/crypto/sha256/sha256_test.v +++ b/vlib/crypto/sha256/sha256_test.v @@ -5,5 +5,5 @@ import crypto.sha256 fn test_crypto_sha256() { - assert sha256.sum('This is a sha256 checksum.'.bytes()).hex() == 'DC7163299659529EAE29683EB1FFEC50D6C8FC7275ECB10C145FDE0E125B8727' + assert sha256.sum('This is a sha256 checksum.'.bytes()).hex() == 'dc7163299659529eae29683eb1ffec50d6c8fc7275ecb10c145fde0e125b8727' } diff --git a/vlib/crypto/sha512/sha512_test.v b/vlib/crypto/sha512/sha512_test.v index 1e9354379a..ebffb6bdf7 100644 --- a/vlib/crypto/sha512/sha512_test.v +++ b/vlib/crypto/sha512/sha512_test.v @@ -5,5 +5,5 @@ import crypto.sha512 fn test_crypto_sha512() { - assert sha512.sum512('This is a sha512 checksum.'.bytes()).hex() == '4143E55FCBA7E39B20F62A1368E5EB28F64A8859458886117AC66027832E0F9F5263DAEC688C439D2D0FA07059334668D39E59543039703DBB7E03EC9DA7F8D7' + assert sha512.sum512('This is a sha512 checksum.'.bytes()).hex() == '4143e55fcba7e39b20f62a1368e5eb28f64a8859458886117ac66027832e0f9f5263daec688c439d2d0fa07059334668d39e59543039703dbb7e03ec9da7f8d7' }