fix: change to release script to config directory
This commit is contained in:
11
config/release/generate-token.mjs
Normal file
11
config/release/generate-token.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
import * as nanoid from 'nanoid';
|
||||
|
||||
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
//HMAC-256:推荐 32 字节。
|
||||
// HMAC-512:推荐 64 字节。
|
||||
|
||||
// jsonwentoken 默认使用 HMAC-256 算法,生成 32 字节的 token。
|
||||
|
||||
const v = nanoid.customAlphabet(alphabet, 32);
|
||||
console.log('v', v());
|
Reference in New Issue
Block a user