MCPcopy Create free account
hub / github.com/PIKACHUIM/CFWorkerACME / newNonce

Function newNonce

src/users.ts:144–152  ·  view source on GitHub ↗
(lens: number = 8)

Source from the content-addressed store, hash-verified

142
143// 生成种子 ###############################################################################
144export async function newNonce(lens: number = 8): Promise<string> {
145 let charset = 'ABCDEFGHJKLMNPQRSTUWXY0123456789';
146 let results = '';
147 for (let i = 0; i < lens; i++) {
148 const randomIndex = Math.floor(Math.random() * charset.length);
149 results += charset[randomIndex];
150 }
151 return results;
152}
153
154
155/* ########################################################################################

Callers 4

handleRotateTokenFunction · 0.90
getNonceFunction · 0.85
addUsersFunction · 0.85
userRegsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected