MCPcopy Index your code
hub / github.com/simstudioai/sim / generatePassword

Function generatePassword

apps/sim/lib/core/security/encryption.ts:44–53  ·  view source on GitHub ↗
(length = 24)

Source from the content-addressed store, hash-verified

42 * @returns A new secure password string
43 */
44export function generatePassword(length = 24): string {
45 const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_-+='
46 let result = ''
47
48 for (let i = 0; i < length; i++) {
49 result += chars.charAt(randomInt(0, chars.length))
50 }
51
52 return result
53}

Callers 2

GeneratedPasswordInputFunction · 0.90
encryption.test.tsFile · 0.90

Calls 1

randomIntFunction · 0.90

Tested by

no test coverage detected