Inspiration
It is a project related to Global Hack Week: Beginners Week Day 3
What it does
It can print a random password with some length between 8-12
How we built it
I used dart language to build it.
Code
import 'dart:math';
void main() {
var minLength = 8;
var maxLength = 12;
var random = Random.secure();
var characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#\$%^&*()_+-=';
var password = '';
int length = random.nextInt(maxLength - minLength) + minLength;
for (var i = 0; i < length; i++) {
password += characters[random.nextInt(characters.length)];
}
print(password);
}
Built With
- dart
Log in or sign up for Devpost to join the conversation.