hashlib
Secure hash functions, checksum generators, and key derivation algorithms optimized for Dart.
2.4.2
88K downloads/mo
#1183 most downloaded on pub.dev
bitanon/hashlib
What this package is like to depend on
Last release 1 months ago
08 Jul 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 51 of 53 stable releases
9 versions withdrawn
withdrawn after publishing
4 years old
62 releases · first in 2023
9 releases in the last 12 months
see the full history below
Release timeline
62 releases · Jan 2023 to Jul 2026Releases
latest 60 of 62-
2.4.208 Jul 2026 -
2.4.108 Jul 2026Release notes
Open source →- Replace the
hashlib_codecsdependency with its renamed successorconvertlib(^3.5.0).
Thehashlibpublic API, includingpackage:hashlib/codecs.dart, is unchanged.
Full Changelog: v2.4.0...v2.4.1
Release notes
Open source →- Replace the
hashlib_codecsdependency with its renamed successorconvertlib(^3.5.0). Thehashlibpublic API, includingpackage:hashlib/codecs.dart, is unchanged.
- Replace the
-
2.4.007 Jul 2026Release notes
Open source →- Fix
CRC64Paramssplitting of 64-bitpoly,seed, andxorOutvalues in the custom polynomial constructor. - New method
stringStreaminHashBase. Deprecates the misspelledstringStraem. - Documents that
XXHash64,XXH3, andXXH128are not supported on the web platform. - Updates the removal target of the deprecated
HashRegistryandBlockHashRegistryto 4.0.0. - Update
hashlib_codecsdependency to 3.3.1 - Adds a security policy:
SECURITY.md
Full Changelog: v2.3.4...v2.4.0
Release notes
Open source →- Fix
CRC64Paramssplitting of 64-bitpoly,seed, andxorOutvalues in the custom polynomial constructor. - New method
stringStreaminHashBase. Deprecates the misspelledstringStraem. - Documents that
XXHash64,XXH3, andXXH128are not supported on the web platform. - Updates the removal target of the deprecated
HashRegistryandBlockHashRegistryto 4.0.0. - Update
hashlib_codecsdependency to 3.3.1 - Adds a security policy:
SECURITY.md
- Fix
-
2.3.419 Apr 2026Release notes
Open source →- Update
hashlib_codecsdependency to 3.1.2 - Refactor
HashDigestclass to extendByteCollector.
Full Changelog: v2.3.3...v2.3.4
Release notes
Open source →- Update
hashlib_codecsdependency to 3.1.2 - Refactor
HashDigestclass to extendByteCollector.
- Update
-
2.3.318 Apr 2026Release notes
Open source →- Update
hashlib_codecsdependency to 3.1.1 - Refactor
HashDigestclass to extendByteCollector.
Full Changelog: v2.3.2...v2.3.3
- Update
-
2.3.218 Apr 2026Release notes
Open source →- Update hashlib_codecs dependency to 3.1.0
Full Changelog: v2.3.1...v2.3.2
-
2.3.117 Apr 2026 -
2.3.020 Dec 2025Release notes
Open source →- Secure random number generation. by @elliotwutingfeng in #35
- generator_vm.dart
- Avoids mixing predictable datetime output with CSPRNG output.
- generator_js.dart
- Avoids mixing predictable datetime output with CSPRNG output.
- Adds
NodeRandomas an implementation ofRandomfor NodeJS.nextInt(max)draws 32-bit values from NodeJS's internalcryptopackage.
secureRandom()usesNodeRandomfor secure random numbers.$generateSeed()delegates tosecureRandom().
- generators.dart
- Fixes spelling of
_hashGenerator
- Fixes spelling of
- generator_vm.dart
Full Changelog: v2.2.0...v2.3.0
Release notes
Open source →generator_vm.dart- Avoids mixing predictable datetime output with CSPRNG output.
generator_js.dart- Avoids mixing predictable datetime output with CSPRNG output.
- Adds
NodeRandomas an implementation ofRandomfor NodeJS.nextInt(max)draws 32-bit values from NodeJS's internalcryptopackage.
secureRandom()usesNodeRandomfor secure random numbers.$generateSeed()delegates tosecureRandom().
generators.dart- Fixes spelling of
_hashGenerator
- Fixes spelling of
- Secure random number generation. by @elliotwutingfeng in #35
-
2.2.009 Aug 2025 -
2.1.004 Aug 2025Release notes
Open source →- Enhances the CRCs with custom polynomial support.
- Reduces global variables to optimize runtime memory.
- Removes deprecated utilities:
src/core/utils.dart.
-
2.0.104 Aug 2025 withdrawnNothing published for this version
-
2.0.010 Jun 2025Release notes
Open source →- Support for random number generator based on sm3:
RNG.sm3 - Improves documentation
- Support for random number generator based on sm3:
-
1.24.020 Dec 2025Release notes
Open source →- Secure random number generation. by @elliotwutingfeng in #35
- generator_vm.dart
- Avoids mixing predictable datetime output with CSPRNG output.
- generator_js.dart
- Avoids mixing predictable datetime output with CSPRNG output.
- Adds
NodeRandomas an implementation ofRandomfor NodeJS.nextInt(max)draws 32-bit values from NodeJS's internalcryptopackage.
secureRandom()usesNodeRandomfor secure random numbers.$generateSeed()delegates tosecureRandom().
- generators.dart
- Fixes spelling of
_hashGenerator
- Fixes spelling of
- generator_vm.dart
Full Changelog: v1.23.0...v1.24.0
- Secure random number generation. by @elliotwutingfeng in #35
-
1.23.009 Aug 2025 -
1.22.005 Aug 2025Nothing published for this version
-
1.21.314 Jun 2025Nothing published for this version
-
1.21.213 Mar 2025 -
1.21.115 Nov 2024 -
1.21.018 Sep 2024Release notes
Open source →- Moves random generators outside of the base package;
import 'package:hashlib/random.dart'; - Introduces UUID generators. Example:
uuid.v4()
- Moves random generators outside of the base package;
-
1.20.414 Sep 2024 -
1.20.311 Sep 2024Release notes
Open source →- Exports hashlib_codecs from current package;
import 'package:hashlib/codecs.dart';
- Exports hashlib_codecs from current package;
-
1.20.208 Sep 2024 -
1.20.108 Sep 2024 -
1.20.008 Sep 2024Release notes
Open source →- Fixes issue in
shake128generatorandshake256generator: wrong bytes sequence after 168th and 136th. - Fixes
numberfor 64-bit integer output inHashDigest - Fixes
octfor octal string outupt inHashDigest - Bump version for
hashlib_codecs - [Breaking Changes]:
- Refactors
HashBaseandMACHashBase - Renames
argon2verify->argon2Verify - Renames
poly1305->poly1305auth, and removespoly1305pair - Removes for
tuneArgon2Security. It has been moved to examples folder. - Interfaces for
hmac,pbkdf2,Blake2bMACandBLAKE2sMAC - Duration for period in
TOTP.
- Refactors
-
1.19.211 Jul 2024Release notes
Open source →- Expose infinite generator methods for SHAKE
shake128generatorshake256generator
- Generalize the random seed list generation to support web
- Expose methods to get padded string value from TOTP:
valueStringstreamString
- Expose infinite generator methods for SHAKE
-
1.19.106 Jul 2024Release notes
Open source →- Improve support for random generator
HashlibRandomclass for generating random number, bool, strings etc.- Refactor
KeccakRandomto be available asHashlibRandom.keccak
- [Breaking Changes]:
- Remove all deprecated string extension
- Remove
consume, usebindinstead. consumeAsis renamed tostringStraem.- Introduced
byteStream - Adds
fillNumbersto fill List<int> with random integers. - Use secure random generator by default
- Improve support for random generator
-
1.19.006 Jul 2024 withdrawnNothing published for this version
-
1.18.101 Jul 2024 -
1.18.030 Jun 2024Release notes
Open source →- Implement BCrypt algorithm.
- New class:
Bcrypt - New methods:
bcrypt,bcryptSalt,bcryptVerify,bcryptDigest
- New class:
- Convert all asUint...List to Uint...List.view
- Refactor:
Argon2.fromEncodedwill now acceptCryptDataonly. - New method:
Argon2Context.fromEncodedacceptingCryptData.
- Implement BCrypt algorithm.
-
1.17.029 Jun 2024Release notes
Open source →- Update Argon2 interface:
- Paramters
saltandhashLengthare now optional. - If absent,
saltis generated using default random generator. - Default hash length is now 32 instead of 24.
- Extracts method
Argon2Security.optimize->tuneArgon2Security
- Paramters
- Put deprecation message on string extensions
- Update benchmarks
- Update Argon2 interface:
-
1.16.012 May 2024 -
1.15.011 May 2024Release notes
Open source →- Expose
currentTimeinTOTP - Implement MD4 algorithm.
- New constant:
md4 - New method:
md4sum
- New constant:
- Expose
-
1.14.023 Apr 2024Release notes
Open source →- Accept random number generator input in the following method parameters:
randomBytesfillRandom
- Adds new method to generate 32-bit random numbers:
randomNumbers - Adds
KeccakRandomas proof of concept random number generator.
- Accept random number generator input in the following method parameters:
-
1.13.117 Apr 2024 -
1.13.015 Apr 2024Release notes
Open source →- Breaking changes on public methods:
- renames
poly1305->poly1305pair - renames
poly1305auth->poly1305 - accepts 16 bytes key for
poly1305
- renames
- Refactor
Poly1305class structure. Breaking changes:- renames
Poly1305.auth->Poly1305.pair - removes getter
secret(keycontains both keypair).
- renames
- Refactor benchmark calculation.
- Breaking changes on public methods:
-
1.12.113 Apr 2024Release notes
Open source →- Optimize
HMACruntime. - Refactor
Argon2class structure. Breaking changes:- renames variable:
lanestoparallelism - renames variable:
passestoiterations
- renames variable:
- Bump version of the hashlib_codecs
- Optimize
-
1.12.022 Jun 2023Release notes
Open source →- Breaking: The
HashDigest.base32andHashDigest.base64will have padding by default. - Bump version of the hashlib_codecs
- Breaking: The
-
1.11.424 May 2023Release notes
Open source →- Move codecs to separate package: hashlib_codecs
- Support BigInt conversion in
HashDigest- Renames
remainder->number - Adds
bigIntmethod to getBigIntfrom bytes
- Renames
-
1.11.319 May 2023Release notes
Open source →- Throws
FormatExceptionfor invalid characters in codecs - Adds
base2codes. New methods:fromBinarytoBinary
- Throws
-
1.11.214 May 2023Release notes
Open source →- Export codecs
- Update documentation
- Truncate seed to 32-bit integer for xxh32
-
1.11.113 May 2023Release notes
Open source →- Export a few additional clases
BlockHashBaseBlockHashSinkHashBaseHashDigestSinkHashDigestArgon2HashDigestBlockHashRegistryHashRegistryUint8Codec
- Export a few additional clases
-
1.11.012 May 2023Release notes
Open source →- Optimize Poly1305 implementation (30x improvement in hashrate)
- Optimize scrypt implementation (10x improvement in runtime)
- RIPEMD algorithm series. New hash functions:
ripemd128,ripemd128sumripemd160,ripemd160sumripemd256,ripemd256sumripemd320,ripemd320sum
- Codecs are now able to handle padding characters
-
1.10.030 Apr 2023Release notes
Open source →- Adds support for
Poly1305MAC generation: #5- New class:
Poly1305 - New methods:
poly1305,poly1305auth
- New class:
- Adds support for OTP generation:
- Name all hash algorithms and a registry to loopup algorithms by name.
BlockHashRegistry- for block hash algorithmsHashRegistry- for all hash algorithms
- Adds random byte generator:
randomBytesmethod returns aList<int>fillRandommethod fills aByteBufferwith random values
- New default instances for
Shake128:shake128_128shake128_160shake128_224shake128_256shake128_384shake128_512
- New default instances for
Shake256:shake256_128shake256_160shake256_224shake256_256shake256_384shake256_512
- Adds two new methods to
MACHashBase:sign: generates a tag from a messageverify: verifies if a message and tag matches
- Updates
HashDigest- Adds
isEqualto match it with otherHashDigest,String,TypedData,ByteBuffer,List<int>,Iterable<int> - Use custom equality check
- Adds
- Extracts few methods from utils and create codecs:
- Available:
ASCIICodecB16CodecB32CodecB64CodecB64URLCodec
- New or transferred methods:
toAsciifromAsciitoHexfromHextoBase32fromBase32toBase64fromBase64toBase64UrlfromBase64Url
- New constants:
asciibase16base16lowerbase32base32lowerbase64base64url
- Available:
- New example:
otpauth_parser.dart. It can decode migration string from Google Authenticator and parse any valid otpauth string. - Updates benchmarks
- Adds support for
-
1.9.008 Apr 2023Release notes
Open source →- Adds SCRYPT:
- New class:
Scrypt - New method:
scrypt
- New class:
- Changes in
PBKDF2and extensions:- parameter type of
keyLength - use default iterations = 1000
- adds validation in the constructor
- adds global
pbkdf2function
- parameter type of
- Adds SCRYPT:
-
1.8.120 Mar 2023Release notes
Open source →- Improves
dart runusing@pragma('vm:prefer-inline') - Adds new methods:
crc64sumxxh64sumxxh3sumxxh128sum
- Removes methods:
xxh128code
- Improves
-
1.8.016 Feb 2023Release notes
Open source →- Adds xxHash64
- New class:
XXHash64 - New constants:
xxh64,xxh64code - String extension:
xxh64code
- New class:
- Adds xxHash32
- New class:
XXHash32 - New constants:
xxh32,xxh32code - String extension:
xxh32code
- New class:
- Adds XXH3-64
- New class:
XXH3 - New constants:
xxh3,xxh3code - String extension:
xxh3code
- New class:
- Adds XXH3-128
- New class:
XXH128 - New constants:
xxh128,xxh128code - String extension:
xxh128code
- New class:
- Internal changes:
- Removes the parameters from
$finalizemethod inBlockHash - Uses
>>>instead of>>
- Removes the parameters from
- Uses Hash Rate instead of Runtime for benchmarks
- Adds xxHash64
-
1.7.028 Jan 2023Release notes
Open source →- Renames
Argon2Security.small->Argon2Security.little - Adds
Argon2Security.optimizemethod to find optimal parameters for a desired runtime. - Define
KeyDerivatorand extend it forArgon2 - Modify internal structure of
Argon2to make it faster. - Implement
resetfunctionality for all hash sinks. - Define and use
BlockHashBasefor some algorithms. - Renames
BlockHash->BlockHashSink - Replaces the RFC links to ietf domain.
- Adds
PBKDF2key derivator. - Adds extension to
HMACto createPBKDF2instance. - Define
MACHashBaseandMACSinkBasefor Message Authentication Code generators. - Reset features for
crc16,crc32,crc64,adler32, andhmacinternal sinks. - Enhance
blake2bandblake2sfor MAC generation - Breaking change:
- Accept number of bytes instead of bits for
Blake2bandBlake2s - Removes all
Blake2b.of##andBlake2s.of##methods
- Accept number of bytes instead of bits for
- Renames
-
1.6.123 Jan 2023 -
1.6.023 Jan 2023Release notes
Open source →- Optimize Argon2 (Now it is 6 times faster than 1.5.0)
- Support for Argon2 in Node platform (TODO: requires optimization)
- Renames
Argon2Context->Argon2with the following change:convert()will generate password hash and return anArgon2HashDigestencode()will generate password hash and return argon2 encoded string.toInstance()is renamed toinstanceto get a singleton instance.- The method
encode()is renamed toconvert()inside theinstance.
- Adds
Argon2Securityexposing some default parameter choices which can be used with these quick access functions:argon2dargon2iargon2id
- Argon2 will now return the
Argon2HashDigest, containing a few changes overHashDigest:encoded()will return the argon2 hash as encoded format.toString()will return the encoded hash instead of the password hash.
- Implement custom
toBase64andfromBase64in utils for faster conversion without padding. - Changes to
HashDigest:- merge
base64andbase64urlmethods into one. - uses custom base64 conversion that does not include
=padding. - removes
lantin1
- merge
-
1.5.019 Jan 2023Release notes
Open source →- Fixes issues with web platform
- Adds web support to
blake2b - Adds Argon2, the Password Hashing Competition winner.
-
1.4.015 Jan 2023Release notes
Open source →- Modifies the internal structure for better accessibility
- Fixes stream binding issue in
HashBase - Removes a lot of string extensions. Remaining ones are:
sha512digestsha256digestsha224digestsha3_512digestsha3_384digestsha3_256digestsha3_224digestsha1digestmd5digestcrc32code
- Accepts file input in
HashBase - Accepts
saltandpersonalizationvalues withBlake2sandBlake2b
-
1.3.012 Jan 2023Release notes
Open source →- Reduces memory overhead by utilizing the buffer in all
BlockHash - Fixes broken sha512 hash fo web VM
- New features:
blake2sblake2b
- Reduces memory overhead by utilizing the buffer in all
-
1.2.011 Jan 2023 -
1.1.010 Jan 2023Release notes
Open source →- Adds
Stringextensions for convenient use all algorithms. - Renames functions:
sha512sum224->sha512t224sumsha512sum256->sha512t256sum
- Renames function for
HashBase:HashBase.stream->HashBase.consumeHashBase.stringString->HashBase.consumeAs
- Modifies the internal
HashDigestSink:- Implements
ByteConversionSinkinstead of extendingSink<List<int>> - Use
addSliceinstead ofadd
- Implements
- Improves performance of some algorithms
- Adds
-
1.0.009 Jan 2023 -
1.0.0-dev.707 Jan 2023 pre-release withdrawnNothing published for this version
-
1.0.0-dev.607 Jan 2023 pre-release withdrawnNothing published for this version
-
1.0.0-dev.504 Jan 2023 pre-release withdrawnNothing published for this version
-
1.0.0-dev.404 Jan 2023 pre-release withdrawnNothing published for this version
-
1.0.0-dev.304 Jan 2023 pre-release withdrawnNothing published for this version