secure_password_utility 1.0.1 copy "secure_password_utility: ^1.0.1" to clipboard
secure_password_utility: ^1.0.1 copied to clipboard

outdated

This password utility encourages the use of strong passwords in flutter apps.

example/secure_password_utility_example.dart

import 'package:secure_password_utility/secure_password_utility.dart';

void main() {
  checkPasswordStrength('#sh0klmNZa',10);
  //createPassword(14);
  //createProductKey(20);
}

//Check the strength of your password. It returns a boolean
Future<bool> checkPasswordStrength(String password, int passwordLength) async {
  var passcodeStrength = false;
  await SecurePasswordGateway().checkWeakPassword(password,passwordLength)
  .then((value) => {
    passcodeStrength = value
  });
  print('Strong password is $passcodeStrength');
  return passcodeStrength;
}

//Create a new password with a certain length
Future<dynamic> createPassword(int passwordLength) async {
  var createdPassword = '';
  await SecurePasswordGateway().generateStrongPassword(passwordLength)
      .then((value) => createdPassword = value);
  print('generated strong password is $createdPassword');
  return createdPassword;
}


String createProductKey(int productKeyLength) {
  var res = SecurePasswordGateway().generateProductKey(productKeyLength);
  print('PRODUCT KEY IS::::: $res');
  return res;
}
1
likes
0
points
49
downloads

Publisher

verified publisherinspiratixhub.com

Weekly Downloads

This password utility encourages the use of strong passwords in flutter apps.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on secure_password_utility