update:
1. update auth api
This commit is contained in:
@@ -10,54 +10,46 @@ import org.springblade.core.tool.utils.*;
|
|||||||
public class CryptoKeyGenerator {
|
public class CryptoKeyGenerator {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String code = new StringBuilder(Long.toString(13370065231L, 36)).reverse().toString();
|
|
||||||
System.out.println("=========== code 配置如下 ============");
|
|
||||||
System.out.println("code: " + code.toUpperCase());
|
|
||||||
// System.out.println("=========== uncode 配置如下 ============");
|
|
||||||
// long l = Long.parseLong(code, 36);
|
|
||||||
// System.out.println("number: " + l);
|
|
||||||
|
|
||||||
|
String cryptoKey = AesUtil.genAesKey();
|
||||||
|
String aesKey = AesUtil.genAesKey();
|
||||||
|
String desKey = DesUtil.genDesKey();
|
||||||
|
|
||||||
|
System.out.println("=========== blade.token.crypto-key 配置如下 ============");
|
||||||
|
System.out.println("#blade配置\n" +
|
||||||
|
"blade:\n" +
|
||||||
|
" token:\n" +
|
||||||
|
" crypto-key: " + cryptoKey);
|
||||||
|
System.out.println("=======================================================");
|
||||||
|
|
||||||
// String cryptoKey = AesUtil.genAesKey();
|
System.out.println(StringPool.EMPTY);
|
||||||
// String aesKey = AesUtil.genAesKey();
|
System.out.println("============ blade.key.crypto-key 配置如下 =============");
|
||||||
// String desKey = DesUtil.genDesKey();
|
System.out.println("#blade配置\n" +
|
||||||
//
|
"blade:\n" +
|
||||||
// System.out.println("=========== blade.token.crypto-key 配置如下 ============");
|
" key:\n" +
|
||||||
// System.out.println("#blade配置\n" +
|
" enabled: true\n" +
|
||||||
// "blade:\n" +
|
" crypto-key: " + cryptoKey);
|
||||||
// " token:\n" +
|
System.out.println("=======================================================");
|
||||||
// " crypto-key: " + cryptoKey);
|
|
||||||
// System.out.println("=======================================================");
|
System.out.println(StringPool.EMPTY);
|
||||||
//
|
System.out.println("============== blade.api.crypto 配置如下 ===============");
|
||||||
// System.out.println(StringPool.EMPTY);
|
System.out.println("#blade配置\n" +
|
||||||
// System.out.println("============ blade.key.crypto-key 配置如下 =============");
|
"blade:\n" +
|
||||||
// System.out.println("#blade配置\n" +
|
" api:\n" +
|
||||||
// "blade:\n" +
|
" crypto:\n" +
|
||||||
// " key:\n" +
|
" enabled: true\n" +
|
||||||
// " enabled: true\n" +
|
" aes-key: " + aesKey + "\n" +
|
||||||
// " crypto-key: " + cryptoKey);
|
" des-key: " + desKey);
|
||||||
// System.out.println("=======================================================");
|
System.out.println("=======================================================");
|
||||||
//
|
|
||||||
// System.out.println(StringPool.EMPTY);
|
System.out.println(StringPool.EMPTY);
|
||||||
// System.out.println("============== blade.api.crypto 配置如下 ===============");
|
System.out.println("============== saber crypto.js 配置如下 ===============");
|
||||||
// System.out.println("#blade配置\n" +
|
System.out.println("export default class crypto {\n" +
|
||||||
// "blade:\n" +
|
" static cryptoKey = '" + cryptoKey + "';\n" +
|
||||||
// " api:\n" +
|
" static aesKey = '" + aesKey + "';\n" +
|
||||||
// " crypto:\n" +
|
" static desKey = '" + desKey + "';\n" +
|
||||||
// " enabled: true\n" +
|
"}");
|
||||||
// " aes-key: " + aesKey + "\n" +
|
System.out.println("=======================================================");
|
||||||
// " des-key: " + desKey);
|
|
||||||
// System.out.println("=======================================================");
|
|
||||||
//
|
|
||||||
// System.out.println(StringPool.EMPTY);
|
|
||||||
// System.out.println("============== saber crypto.js 配置如下 ===============");
|
|
||||||
// System.out.println("export default class crypto {\n" +
|
|
||||||
// " static cryptoKey = '" + cryptoKey + "';\n" +
|
|
||||||
// " static aesKey = '" + aesKey + "';\n" +
|
|
||||||
// " static desKey = '" + desKey + "';\n" +
|
|
||||||
// "}");
|
|
||||||
// System.out.println("=======================================================");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user