Random Password Generator
How do I make an random password generator?
A random password generator that will make alpha-numeric, hexadecimal, or ASCII passwords of lengths 4, 6, 8, 10, 12, 14, and 16 chars long. You can then use a button to copy your password securely to the clipboard. . What is a random password generator? How do you make a random password generator? This script and codes were developed by Joshua Michael Waggoner on 11 October 2022, Tuesday.
Random Password Generator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Random Password Generator</title> <link href='https://fonts.googleapis.com/css?family=Lato|Oswald' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class='header'> <h1><span class='noselect'> > <span class='blinker'>_</span> </span> Random Password Generator</h1>
</div>
<select class='btn btn-default pw-select'> <option val='0' selected disabled>Select password type</option> <option val='alpha'>Alpha Numeric</option> <option val='ascii'>ASCII</option> <option val='hex'>Hexadecimal</option>
</select>
<select class='btn btn-default pw-len'> <option val='0' selected disabled>Select length</option> <option val='4'>4-chars</option> <option val='6'>6 chars</option> <option val='8'>8 chars</option> <option val='10'>10 chars</option> <option val='12'>12 chars</option> <option val='14'>14 chars</option> <option val='16'>16 chars</option>
</select>
<button class=' btn btn-success submit'> Generate
</button>
<h2 class='pw'> <div class='password'>password</div>
</h2>
<button class='btn btn-danger clip'> Copy To Clipboard
</button> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Random Password Generator - Script Codes CSS Codes
body { text-align: center;
}
.header { font-family: 'Oswald';
}
.blinker { animation-name: blinker; animation-iteration-count: infinite; animation-duration: 1s; display: inline-block;
}
body { background-color: #333; color: white;
}
h1 { text-transform: uppercase; margin: 20px;
}
select, button { font-family: 'Lato';
}
.pw { letter-spacing: .4em; font-family: monospace; maring-bottom: 30px;
}
@keyframes blinker { from { opacity: 1.0; } to { opacity: 0.0; }
}
Random Password Generator - Script Codes JS Codes
(function() { var charset, charset_alpha, charset_hex, copy, generateAsciiPwd, generatePwd, len, pwType; pwType = null; len = null; charset = null; charset_alpha = 'abcdefghijklnopqrstuvwxyz' + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + '0123456789'; charset_hex = '0123456789ABCDEF'; $('.pw-select').on('click', function() { pwType = $(".pw-select option:selected").attr('val'); }); $('.pw-len').on('click', function() { len = $(".pw-len option:selected").attr('val'); }); $('.submit').click(function() { if (pwType === 'alpha') { charset = charset_alpha; generatePwd(len); } if (pwType === 'hex') { charset = charset_hex; generatePwd(len); } if (pwType === 'ascii') { generateAsciiPwd(len); } }); $('.clip').on('click', function() { copy($('.password').text()); }); /* * Generate an alpha numeric or hex pw */ generatePwd = function(length) { var i, n, retVal; retVal = ''; i = 0; n = charset.length; while (i < length) { retVal += charset.charAt(Math.floor(Math.random() * n)); ++i; } if (retVal !== '') { return $('.password').text(retVal); } }; /* * Generate an ascii pw */ generateAsciiPwd = function(length) { var i, n, offset, random, retVal; retVal = ''; i = 0; offset = 33; n = 92; while (i < length) { random = Math.floor(Math.random() * n); retVal += String.fromCharCode(random + offset); ++i; } if (retVal !== '') { return $('.password').text(retVal); } }; /* * Copies the password to an alert so that * the user can copy it. This is the most * secure way I can think to do it. */ copy = function(text) { window.prompt('Copy to clipboard: Ctrl+C, Enter', text); }; $('.prompt').css('animation', 'blinker 1.5s ease-in-out infinite');
}).call(this);
Developer | Joshua Michael Waggoner |
Username | rabbitfighter81 |
Uploaded | October 11, 2022 |
Rating | 3 |
Size | 4,286 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Retro CoffeeScript Timer | 3,225 Kb |
React SearchBox | 4,521 Kb |
Modern Dark Theme CoffeeScript Timer | 3,257 Kb |
Denver Broncos Arrests Since January 1, 2000 | 11,439 Kb |
A Pen by Joshua Michael Waggoner | 4,218 Kb |
Cool menu with psychedelic circles. | 4,630 Kb |
CSS Media Queries Example | 6,470 Kb |
Quiz - Question4 | 2,559 Kb |
MomentJS Clock | 2,940 Kb |
Simple Popup Window with Dark Alpha Overlay | 3,433 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Midterm dry run | Jds317 | 1,649 Kb |
Sign Up Form | Sicontis | 5,272 Kb |
Project MMetro beta | Atomicsong | 5,157 Kb |
Whyutils | LeYvan | 3,752 Kb |
Sticky menu on scroll | Senff | 2,869 Kb |
Css3 loader | Clknap | 2,391 Kb |
Medium Menu | Lucasmotta | 3,923 Kb |
Eunice A | Ejbronze | 2,203 Kb |
Using Flickr API | MoyArt | 6,761 Kb |
Responsive slide | Thorien | 2,400 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!