From c2a07bfa0fea1b061d26a59ff9192008db5f977f Mon Sep 17 00:00:00 2001 From: xiaoguang Date: Fri, 19 Jan 2024 19:20:33 +0800 Subject: [PATCH] fix: fix binding invalid_key_iv_length error --- imkey-core/ikc-device/src/key_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imkey-core/ikc-device/src/key_manager.rs b/imkey-core/ikc-device/src/key_manager.rs index e1bb254f..fd9bcb15 100644 --- a/imkey-core/ikc-device/src/key_manager.rs +++ b/imkey-core/ikc-device/src/key_manager.rs @@ -70,7 +70,7 @@ impl KeyManager { data.extend(&hash[..4]); //AES-CBC encryption - let ciphertext = encrypt_pkcs7(&self.encry_key, &self.iv, &data)?; + let ciphertext = encrypt_pkcs7(&data, &self.encry_key, &self.iv)?; //base64 coding Ok(encode(&ciphertext))