Skip to content

Commit 55ad52a

Browse files
committed
sm4: fixed build errors
1 parent da3cdac commit 55ad52a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sm4/src/soft.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use cipher::{
44
consts::U16, inout::InOut, AlgorithmName, Block, BlockCipher, BlockSizeUser, Key, KeyInit,
55
KeySizeUser,
66
};
7-
use core::fmt;
7+
use core::{convert::TryInto, fmt};
88

99
use crate::consts::{CK, FK, SBOX};
1010

sm4/tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ fn sm4_example_1_blocks() {
8383
let mut blocks = plaintext;
8484
cipher.encrypt_blocks(&mut blocks);
8585

86-
assert_eq!(&ciphertext, blocks.as_slice());
86+
assert_eq!(&ciphertext, &blocks);
8787

8888
cipher.decrypt_blocks(&mut blocks);
89-
assert_eq!(&plaintext, blocks.as_slice());
89+
assert_eq!(&plaintext, &blocks);
9090
}

0 commit comments

Comments
 (0)