cypher 2.0.2

SDKflutter
Platformandroidioswindowslinuxmacosweb

Generates passwords which can contain digits, lower case letters, upper case letters and punctuations.

cypher

Cypher is an android library for flutter to generate strong passwords simply and fast.

How to Use

# add this line to your dependencies
cypher: ^2.0.2
import 'package:cypher/cypher.dart';

Generating passwords

Cypher.create(
  length: 15,
  useDigits: true,
  useLowerCase: true,
  useUpperCase: true,
  usePunctuation: false,
);

Checking Password Strength

final status = Cypher.checkPasswordStrength('password');

print(status.hasDigits);
print(status.hasLowerCase);
print(status.hasUpperCase);
print(status.hasPunctuation);

Checking Password Strength Using Stream

  • Pass onPasswordChanged method to a textfield
TextField(
  onChanged: Cypher.onPasswordChanged,
)
  • Then you can listen changes
Cypher.onPasswordStatusChange.listen(_onStatusChange);

void _onStatusChange(PasswordStatus status) {
  print(status.hasDigits);
  print(status.hasLowerCase);
  print(status.hasUpperCase);
  print(status.hasPunctuation);
}