From 420bc83904e95c31570d4d8648d0de0423c3ef60 Mon Sep 17 00:00:00 2001 From: Zed Date: Fri, 18 Dec 2020 09:32:26 +0800 Subject: [PATCH] =?UTF-8?q?DEC-15861=20feat:=20Fr/Bi=E8=9E=8D=E5=90=88?= =?UTF-8?q?=E4=B8=8E=E7=8B=AC=E7=AB=8B=E9=83=A8=E7=BD=B2V1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/security/SecurityKitTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/fanruan/api/security/SecurityKitTest.java b/src/test/java/com/fanruan/api/security/SecurityKitTest.java index a8a2bd0..51cf073 100644 --- a/src/test/java/com/fanruan/api/security/SecurityKitTest.java +++ b/src/test/java/com/fanruan/api/security/SecurityKitTest.java @@ -1,11 +1,11 @@ package com.fanruan.api.security; - import com.fr.stable.CommonCodeUtils; import org.junit.Assert; import org.junit.Test; public class SecurityKitTest { + @Test public void passwordDecode() { Assert.assertEquals(SecurityKit.passwordDecode("1234"), CommonCodeUtils.passwordDecode("1234")); @@ -18,7 +18,8 @@ public class SecurityKitTest { @Test public void aes() { - String text = SecurityKit.aesEncrypt("zed", "IrgwAINYUSLqVxHL"); - Assert.assertEquals("zed", SecurityKit.aesDecrypt(text, "IrgwAINYUSLqVxHL")); + String seed = SecurityKit.createSeed(); + String text = SecurityKit.aesEncrypt("zed", seed); + Assert.assertEquals("zed", SecurityKit.aesDecrypt(text, seed)); } }