From 0ff435c76e785250dec5aa0c8c3bff033ad110c0 Mon Sep 17 00:00:00 2001 From: smallchill Date: Wed, 13 Sep 2023 00:27:21 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20=E5=A2=9E=E5=8A=A0aesKey=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/springblade/test/AesKeyGenerator.java | 23 +++++++++++++++++++ doc/nacos/blade.yaml | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 blade-auth/src/test/java/org/springblade/test/AesKeyGenerator.java diff --git a/blade-auth/src/test/java/org/springblade/test/AesKeyGenerator.java b/blade-auth/src/test/java/org/springblade/test/AesKeyGenerator.java new file mode 100644 index 0000000..0ea6c91 --- /dev/null +++ b/blade-auth/src/test/java/org/springblade/test/AesKeyGenerator.java @@ -0,0 +1,23 @@ +package org.springblade.test; + +import org.springblade.core.tool.utils.AesUtil; + +/** + * aesKey生成器 + * + * @author Chill + */ +public class AesKeyGenerator { + + public static void main(String[] args) { + System.out.println("======================================================="); + for (int i = 0; i < 10; i++) { + String aesKey = AesUtil.genAesKey(); + System.out.println("SpringBlade AesKey:[" + aesKey + "] "); + } + System.out.println("======================================================="); + System.out.println("====== blade.token.aes-key 的值从中挑选一个便可 ========="); + System.out.println("======================================================="); + } + +} diff --git a/doc/nacos/blade.yaml b/doc/nacos/blade.yaml index a4441cb..30c0d90 100644 --- a/doc/nacos/blade.yaml +++ b/doc/nacos/blade.yaml @@ -83,7 +83,7 @@ blade: token: #使用 blade-auth服务 @org.springblade.test.SignKeyGenerator 获取 sign-key: 请配置32位签名提高安全性 - #使用AesUtil.genAesKey()生成,需和后端配置保持一致 + #使用 blade-auth服务 @org.springblade.test.AesKeyGenerator 获取 aes-key: 请配置Aes的密钥 xss: enabled: true