zhongrj
2025-02-21 7728d8f1900a984dde8721f1f06e00eecc5a67de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package org.springblade.test;
 
import org.springblade.core.tool.utils.AesUtil;
import org.springblade.core.tool.utils.DesUtil;
import org.springblade.core.tool.utils.StringPool;
 
/**
 * Key生成器
 *
 * @author Chill
 */
public class CryptoKeyGenerator {
 
    public static void main(String[] args) {
        System.out.println("=======================================================");
        System.out.println("====== blade.token.crypto-key 的值从中挑选一个便可 =======");
        System.out.println("=======================================================");
        for (int i = 0; i < 10; i++) {
            String cryptoKey = AesUtil.genAesKey();
            System.out.println("BladeX CryptoKey:[" + cryptoKey + "] ");
        }
        System.out.println("=======================================================");
        System.out.println(StringPool.EMPTY);
        System.out.println("=======================================================");
        System.out.println("===== blade.api.crypto.aes-key 的值从中挑选一个便可 ======");
        System.out.println("=======================================================");
        for (int i = 0; i < 10; i++) {
            String AesKey = AesUtil.genAesKey();
            System.out.println("BladeX AesKey:[" + AesKey + "] ");
        }
        System.out.println("=======================================================");
        System.out.println(StringPool.EMPTY);
        System.out.println("=======================================================");
        System.out.println("===== blade.api.crypto.des-key 的值从中挑选一个便可 ======");
        System.out.println("=======================================================");
        for (int i = 0; i < 10; i++) {
            String DesKey = DesUtil.genDesKey();
            System.out.println("BladeX DesKey:[" + DesKey + "] ");
        }
        System.out.println("=======================================================");
    }
 
}