Search packages, repositories and app categories

Package detailsv1.2.0

bcrypt

This package use jBCrypt modified code to work with Dart VM.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
90.2K
Likes
46
Pub points
155

Install package

flutter pub add bcrypt

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The bcrypt package provides a Dart implementation of the bcrypt password hashing algorithm, based on modified jBCrypt code. It is designed for secure password storage by generating strong, salted hashes that are resistant to brute-force attacks. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it suitable for cross-platform applications requiring robust authentication security. It integrates seamlessly with Flutter projects via pub.dev.

Use cases

  • Secure password hashing
  • User authentication systems
  • Password storage in databases
  • Protecting sensitive user data
  • Cross-platform security implementations

Key features

  • Salted password hashing
  • Cross-platform compatibility
  • Easy integration with Flutter
  • Resistance to brute-force attacks
  • Supports Dart VM and web

Suitable for

  • Flutter apps needing secure password handling
  • Backend services requiring cryptographic hashing
  • Applications with strict security compliance
  • Developers using Dart for authentication workflows
  • Projects targeting multiple operating systems

Considerations

  • Not suitable for general-purpose encryption
  • Requires careful handling of salt and hash management
  • Performance impact with high work factors
  • Limited to password hashing, not other cryptographic operations
  • Depends on external jBCrypt logic for core functionality

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

style: lint

Hash your passwords with BCrypt algorithm, this is a jBCrypt modified code to work with Dart.

Features

Use BCrypt password-hashing function to keep your system secure.

Getting started

pub package

Only add bcrypt package to your pubspec.yaml.

dependencies:
  bcrypt: ^1.2.0

Usage

Use Bcrypt to hash and check password.

final String hashed = BCrypt.hashpw('password', BCrypt.gensalt());
// $2a$10$r6huirn1laq6UXBVu6ga9.sHca6sr6tQl3Tiq9LB6/6LMpR37XEGu

final bool checkPassword = BCrypt.checkpw('password', hashed);
// true

Additional information

This package is modified jBCrypt code used in Java and Spring Boot to improve security when saving passwords.

Categories

Source repository

Projects using this package

Rankings