From 3f86e75518c49b9ec72f9ae6fd82d10cc21b308e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Tue, 4 Jul 2023 14:59:28 +0800 Subject: [PATCH] =?UTF-8?q?enhance(spiral):=E7=BB=9F=E4=B8=80=E8=9E=BA?= =?UTF-8?q?=E6=97=8B=E7=AE=97=E6=B3=95=E7=9A=84=E7=89=B9=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E8=B5=B7=E5=A7=8B=E4=BD=8D=E5=92=8C=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E6=A3=80=E6=B5=8B=E5=A4=B1=E8=B4=A5=EF=BC=8C=E5=88=99?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=BF=94=E5=9B=9E=E5=AF=86=E6=96=87=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/encryption/spiral.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/encryption/spiral.rs b/src/encryption/spiral.rs index 432eb24..25080cb 100644 --- a/src/encryption/spiral.rs +++ b/src/encryption/spiral.rs @@ -40,7 +40,7 @@ pub fn encrypt(data: String) -> String { /// - `data` 待解密的内容 pub fn decrypt(data: String) -> Result { if !data.starts_with("[") || data.len() <= 21 { - return Err(SpiralCipherError::CorruptedCipherData); + return Ok(data); } let data = data[1..].to_string(); let key_seed = data[0..20].to_string();