패키지, 저장소 및 앱 카테고리 검색

password_strength_checker 표지
패키지 상세v1.3.2

password_strength_checker

보안 비밀번호 생성, 노출된 비밀번호 확인, 강도에 대한 시각적 피드백 또는 최소 비밀번호 강도가 필요한 폼 검증을 수행합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
8.5천
좋아요
55
Pub 점수
150

패키지 설치

flutter pub add password_strength_checker

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

보안 비밀번호를 생성하고 강도를 검증하며 데이터 유출 사고에 노출되었는지 확인하는 데 도움이 되는 플러터 패키지입니다. 비밀번호 강도에 대한 실시간 시각적 피드백을 제공하며 사용자 정의 가능한 최소 강도 요구 사항을 갖춘 폼 검증을 지원합니다. 강력한 인증 기능이 필요한 애플리케이션에 적합하며, 여러 플랫폼의 비밀번호 입력 필드에 원활하게 통합됩니다.

사용 사례

  • 최소 강도를 가진 폼 검증
  • 실시간 비밀번호 강도 피드백
  • 노출된 암호 확인
  • 보안 비밀번호 생성
  • 인증 흐름 개선
  • 크로스 플랫폼 비밀번호 필드

주요 기능

  • 시각적 강도 지표
  • 노출된 암호 감지
  • 사용자 정의 가능한 강도 임계값
  • 비밀번호 생성 유틸리티
  • 양식 검증기와의 통합
  • 다중 플랫폼 지원

적합한 대상

  • 인증 화면
  • 사용자 등록 양식
  • 보안 중심 앱
  • 비밀번호 관리 도구
  • 보안을 우선시하는 개발 팀
  • 비밀번호 정책 준수를 요구하는 앱

고려 사항

  • 누출 검사에 인터넷 연결이 필요합니다
  • 앱 크기가 약간 증가할 수 있습니다
  • 노출 조회를 위해 외부 API에 의존합니다
  • 오프라인 전용 환경에는 적합하지 않습니다
  • 실시간 검증 중 성능에 미치는 영향
  • API 실패에 대한 적절한 오류 처리가 필요합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

password_strength_checker

License Pub Version Pub Likes Pub Points Pub Monthly Downloads GitHub code size in bytes GitHub Repo stars GitHub issues GitHub release (latest by date) GitHub top language CI

Generate secure passwords, check for exposed passwords, get visual feedback for password strength or get form validation with a minimum password strength required.

Check the strength of the password in a visual way, with an animation when the strength changes according to the settings given by the user. Use it also inside a Form to get form validation!

Features

  • Check for exposed common password using the commonDictionary, a map with 10,000 leaked passwords!
  • Use the PasswordStrengthChecker to have a visual feedback.
  • Use the PasswordStrengthFormChecker to have a built-in TextFormField inside the widget and get form validation using a minimumStrengthRequired.
  • Use the PasswordGenerator class to generate a secure random password based on the input configurations (PasswordGeneratorConfiguration).
  • Create your custom strength to create your own rules or use the PasswordStrength default enum (see Custom Strength).

Demo

Demo Form Gif Demo Gif Demo Generator Gif

Getting started

PasswordStrengthChecker

You can use the PasswordStrengthChecker to only have a visual feedback, for example:

final passNotifier = ValueNotifier<PasswordStrength?>(null);
// ...
PasswordStrengthChecker(
  strength: passNotifier,
),

See the full example here.

PasswordStrengthFormChecker

You can use the PasswordStrengthFormChecker to have a built-in TextFormField inside the widget and get form validation using a minimumStrengthRequired. For example:

PasswordStrengthFormChecker(
  minimumStrengthRequired: PasswordStrength.secure,
  onChanged: (password, notifier) {
    notifier.value = PasswordStrength.calculate(text: password);
  },
),

See the full example here.

PasswordGenerator

You can use the PasswordGeneratorclass to generate a secure random password based on the configurations. For example:

final config = PasswordGeneratorConfiguration(
  length: 32,
  minUppercase: 8,
  minSpecialChars: 8,
  // ...
);

final passwordGenerator = PasswordGenerator.fromConfig(
  configuration: config,
);

final password = passwordGenerator.generate();

See the full example here.

Custom Strength

You can use the default PasswordStrength enum to set the strength of the password, or you can create your own enum that implements PasswordStrengthItem and use it. For example:

enum CustomPassStrength implements PasswordStrengthItem {
  weak,
  medium,
  strong;

  @override
  Color get statusColor => switch (this) {
      CustomPassStrength.weak => Colors.red,
      CustomPassStrength.medium => Colors.orange,
      CustomPassStrength.strong => Colors.green,
    };

  @override
  Widget? get statusWidget => switch (this) {
      CustomPassStrength.weak => const Text('Weak'),
      CustomPassStrength.medium => const Text('Medium'),
      CustomPassStrength.strong => const Text('Strong'),
    };

  @override
  double get widthPerc => switch (this) {
      CustomPassStrength.weak => 0.15,
      CustomPassStrength.medium => 0.4,
      CustomPassStrength.strong => 0.75,
    };

  static CustomPassStrength? calculate({required String text}) {
    // Implement your custom logic here
    if (text.isEmpty) {
      return null;
    }
    // Use the [commonDictionary] to see if a password
    // is in 10,000 common exposed password list.
    if (commonDictionary[text] == true) {
      return CustomPassStrength.weak;
    }
    if (text.length < 6) {
      return CustomPassStrength.weak;
    } else if (text.length < 10) {
      return CustomPassStrength.medium;
    } else {
      return CustomPassStrength.strong;
    }
  }
}

Contribution

The project is open source and you can contribute to it here -> repository link

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Contributors


Made with ❤️ from dariowskii

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트