From 999e5d794fa8487d29fc737af509ab7e35dc89f6 Mon Sep 17 00:00:00 2001 From: Fay Date: Mon, 2 Mar 2020 16:57:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/utils/__test__/aes.test.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/core/utils/__test__/aes.test.js diff --git a/src/core/utils/__test__/aes.test.js b/src/core/utils/__test__/aes.test.js new file mode 100644 index 000000000..6b17963b9 --- /dev/null +++ b/src/core/utils/__test__/aes.test.js @@ -0,0 +1,26 @@ +/* + * @Author: fay + * @Date: 2020-03-02 16:50:24 + * @LastEditor: fay + * @LastEditTime: 2020-03-02 16:56:43 + */ +describe("aesDecrypt", function () { + + /** + * test_author_fay + */ + it("aesEncrypt", function () { + var text = "test"; + + expect(BI.aesEncrypt(text, "0123456789ABCDEF")).to.eql("0No4i/uz2cfoo6zQMHaL1A=="); + }); + + /** + * test_author_fay + */ + it("aesDecrypt", function () { + var text = "0No4i/uz2cfoo6zQMHaL1A=="; + + expect(BI.aesDecrypt(text, "0123456789ABCDEF")).to.eql("test"); + }); +});