Random Password Generator

[Solved] Random Password Generator | Php - Code Explorer | yomemimo.com
Question : password generator

Answered by : filthy-flatworm-mdhnh8l2w8jo

function passwordGenerator(length) { const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789012345678901234567890123456789!@#$%&*()_-+=!@#$%&*()_-+=!@#$%&*()_-+=!@#$%&*()_-+="; const password = [...Array(length)].reduce((accumulator, _element) => { const randomIndex = Math.floor(Math.random() * chars.length); return accumulator + chars[randomIndex]; }, ""); return password;
}

Source : | Last Update : Sat, 23 Apr 22

Question : password generator

Answered by : jareer

function CreatePassword(PassLenght) { const Lenght = parseInt(PassLenght)	const Charecters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" let Password = ""; for (var i = 0, n = Charecters.length; i < Lenght; ++i) { Password += Charecters.charAt(Math.floor(Math.random() * n)); } console.log(Password) return Password;
}
CreatePassword(18)

Source : | Last Update : Fri, 14 May 21

Question : random password generator

Answered by : ivn-javier-londoo-rueda

function rand_string( $length ) {	$str = "";	$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";	$size = strlen( $chars );	for( $i = 0; $i < $length; $i++ ) {	$str .= $chars[ rand( 0, $size - 1 ) ];	}	return $str;
}
//and call the function this way:
$mypass = rand_string(10);

Source : | Last Update : Mon, 16 Nov 20

Question : random password generator

Answered by : some-random-monkey

from random import randint
def create_random_chars(charCount): return "".join(chr(randint(33,126)) for i in range(charCount))
print(create_random_chars(10))
# Use Source to compile

Source : https://onecompiler.com/python | Last Update : Fri, 21 Jan 22

Question : online password generator

Answered by : ammer-alqaisi

// psw generator
function passwordGenerator(length) { const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789012345678901234567890123456789!@#$%&*()_-+=!@#$%&*()_-+=!@#$%&*()_-+=!@#$%&*()_-+="; const password = [...Array(length)].reduce((accumulator, _element) => { const randomIndex = Math.floor(Math.random() * chars.length); return accumulator + chars[randomIndex]; }, ""); return password;
}
//=============================================
function CreatePassword(PassLenght) { const Lenght = parseInt(PassLenght)	const Charecters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" let Password = ""; for (var i = 0, n = Charecters.length; i < Lenght; ++i) { Password += Charecters.charAt(Math.floor(Math.random() * n)); } console.log(Password) return Password;
}
CreatePassword(18)

Source : | Last Update : Fri, 17 Jun 22

Question : generate random password

Answered by : nick-triantafillidis

var btn = document.getElementById("btn");
btn.addEventListener("click", function generate() { var generatePassword = ""; var password = document.getElementById("password"); var characters = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*?"; for (var i = 0; i < 10; i++) { generatePassword += characters.charAt( Math.floor(Math.random() * characters.length) ); } password.innerHTML = generatePassword;
});

Source : | Last Update : Thu, 03 Dec 20

Question : generate random password

Answered by : nilso-viani

const generatePassword = (length = 10, specialChars = true) => { const alphaCodesArray = Array.from(Array(26)).map((e, i) => i + 65); const uppercaseAlphabetArray = alphaCodesArray.map((letterCode) => String.fromCharCode(letterCode)); const lowercaseAlphabetArray = uppercaseAlphabetArray.map(e => e.toLowerCase()); const uppercaseAlphabet = [...uppercaseAlphabetArray].join(''); const lowercaseAlphabet = [...lowercaseAlphabetArray].join(''); const numbers = [...Array(10).keys()].join(''); const specialSymbols = typeof specialChars === 'string' ? specialChars : (specialChars ? "!@#$%^&*?" : ""); const characters = `${lowercaseAlphabet}${numbers}${uppercaseAlphabet}${specialSymbols}`; return [...Array(length).keys()].reduce(acc => acc.concat(characters.charAt(Math.floor(Math.random() * characters.length))), '');
}

Source : | Last Update : Wed, 02 Feb 22

Question : password generator

Answered by : dangerous-deer-205mn8et6y1m

#python
from random import randint
import pyperclip
allSymbols = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '- ', '=', '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', ' (', ' )', ' ¹', '²', '³', '⁴', '⁵', '⁶', '⁷', '⁸', '⁹', '⁰', '¡', '¤', '€', '¼', '½', ' ¾', '‘', '’', 'æ', '©', '®', 'þ', '«', '»', '"', "'", 'ß', '§', 'ð', 'œ', 'Æ', 'Œ', 'ø', '¶', 'Ø', '°', '¿', '£', '‘¥', '÷', '×', '/', '?' ]
password = ' '
lenSymbols = len(allSymbols)
recycleMe = int(input("how much characters do you want your password to be? "))
for i in range(recycleMe): password = password + allSymbols[randint(0, lenSymbols)]
print(password)
#pyperclip.copy(password)
#print("copied to clipboard")

Source : | Last Update : Mon, 31 Jan 22

Question : Password Generator

Answered by : harendra

import random
import string
total = string.ascii_letters + string.digits + string.punctuation
length = 16
password = "".join(random.sample(total, length))
print(password)

Source : https://codingblog.online/post/50-useful-python-scripts-free-pdf-download/ | Last Update : Thu, 19 May 22

Question : password generator

Answered by : dangerous-deer-205mn8et6y1m

/*javascript*/ const generate = {password: function(length) {var password = ''; let allSymbols = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '- ', '=', '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', ' (', ' )', ' ¹', '²', '³', '⁴', '⁵', '⁶', '⁷', '⁸', '⁹', '⁰', '¡', '¤', '€', '¼', '½', ' ¾', '‘', '’', 'æ', '©', '®', 'þ', '«', '»', '"', "'", 'ß', '§', 'ð', 'œ', 'Æ', 'Œ', 'ø', '¶', 'Ø', '°', '¿', '£', '‘¥', '÷', '×', '/', '?' ]; for (let step = 0; step < length; step++){password = password + allSymbols[Math.round(Math.random() * allSymbols.length)]}; return password; copy(password)}}

Source : | Last Update : Tue, 01 Feb 22

Answers related to random password generator

Code Explorer Popular Question For Php