{"id":18234341,"url":"https://github.com/bitanon/hashlib","last_synced_at":"2026-04-18T18:01:48.795Z","repository":{"id":65163045,"uuid":"584880455","full_name":"bitanon/hashlib","owner":"bitanon","description":"Secure hash functions, checksum generators, and key derivation algorithms in pure Dart","archived":false,"fork":false,"pushed_at":"2026-04-17T04:17:40.000Z","size":1456,"stargazers_count":30,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-17T04:36:15.860Z","etag":null,"topics":["argon2","cryptography","dart","hash","hashlib","hmac","keccak","otpauth","password-generator","secure-hash","sha3"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitanon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://paypal.me/bitan0n"],"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null}},"created_at":"2023-01-03T18:54:04.000Z","updated_at":"2026-04-17T04:17:11.000Z","dependencies_parsed_at":"2025-08-04T17:13:41.568Z","dependency_job_id":"acf6e7fd-a721-445c-8fcb-2bb52b17fc07","html_url":"https://github.com/bitanon/hashlib","commit_stats":null,"previous_names":["bitanon/hashlib","dipu-bd/hashlib"],"tags_count":81,"template":false,"template_full_name":null,"purl":"pkg:github/bitanon/hashlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitanon%2Fhashlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitanon%2Fhashlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitanon%2Fhashlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitanon%2Fhashlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitanon","download_url":"https://codeload.github.com/bitanon/hashlib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitanon%2Fhashlib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31978808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argon2","cryptography","dart","hash","hashlib","hmac","keccak","otpauth","password-generator","secure-hash","sha3"],"created_at":"2024-11-04T21:03:24.271Z","updated_at":"2026-04-18T18:01:48.789Z","avatar_url":"https://github.com/bitanon.png","language":"Dart","readme":"# hashlib\n\n[![plugin version](https://img.shields.io/pub/v/hashlib?label=pub)](https://pub.dev/packages/hashlib)\n[![test](https://github.com/bitanon/hashlib/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/bitanon/hashlib/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/bitanon/hashlib/branch/master/graph/badge.svg?token=PYVMZWSQNU)](https://codecov.io/gh/bitanon/hashlib)\n[![dart support](https://img.shields.io/badge/dart-%3e%3d%202.19.0-39f?logo=dart)](https://dart.dev/guides/whats-new#may-11-2022-2-17-release)\n[![likes](https://img.shields.io/pub/likes/hashlib?logo=dart)](https://pub.dev/packages/hashlib/score)\n[![pub points](https://img.shields.io/pub/points/hashlib?logo=dart\u0026color=teal)](https://pub.dev/packages/hashlib/score)\n[![Pub Monthly Downloads](https://img.shields.io/pub/dm/hashlib)](https://pub.dev/packages/hashlib/score)\n\nThis library contains implementations of secure hash functions, checksum generators, and key derivation algorithms optimized for Dart.\n\n## Dependencies\n\nThere is only 1 dependency used by this package:\n\n- [hashlib_codecs](https://pub.dev/packages/hashlib_codecs)\n\n## Features\n\n### Block Hash Algorithms\n\n| Algorithm   | Available methods                                                  |        Source        |\n| ----------- | ------------------------------------------------------------------ | :------------------: |\n| MD2         | `md2` , `md2sum`                                                   |       RFC-1319       |\n| MD4         | `md4`, `md4sum`                                                    |       RFC-1320       |\n| MD5         | `md5` , `md5sum`                                                   |       RFC-1321       |\n| SHA-1       | `sha1` , `sha1sum`                                                 |       RFC-3174       |\n| SHA-2       | `sha224`, `sha256`, `sha384`, `sha512`, `sha512t224`, `sha512t256` |       RFC-6234       |\n| SHA-3       | `sha3_224`, `sha3_256`, `sha3_384`, `sha3_512`                     |       FIPS-202       |\n| SHAKE-128   | `Shake128`, `shake128`, `shake128_128`, `shake128_256`             |       FIPS-202       |\n| SHAKE-256   | `Shake256`, `shake256`, `shake256_256`, `shake256_512`             |       FIPS-202       |\n| Keccak      | `keccak224`, `keccak256`, `keccak384`, `keccak512`                 |     Team Keccak      |\n| Blake2b     | `blake2b160`, `blake2b256`, `blake2b384`, `blake2b512`             |       RFC-7693       |\n| Blake2s     | `blake2s128`, `blake2s160`, `blake2s224`, `blake2s256`             |       RFC-7693       |\n| xxHash-32   | `XXHash32`,`xxh32`,`xxh32code`                                     |       Cyan4973       |\n| xxHash-64   | `XXHash64`,`xxh64`,`xxh64code`                                     |       Cyan4973       |\n| xxHash3-64  | `XXH3`, `xxh3`, `xxh3code`                                         |       Cyan4973       |\n| xxHash3-128 | `XXH128`, `xxh128`, `xxh128code`                                   |       Cyan4973       |\n| RIPEMD      | `ripemd128`, `ripemd256`, `ripemd160`, `ripemd320`                 | ISO/IEC 10118-3:2018 |\n| SM3         | `sm3` , `sm3sum`                                                   |   GB/T 32905-2016    |\n\n### Password / Key Derivation Algorithms\n\n| Algorithm | Available methods                                                | Source   |\n| --------- | ---------------------------------------------------------------- | -------- |\n| Argon2    | `Argon2`, `argon2d`, `argon2i`, `argon2id`, `argon2Verify`       | RFC-9106 |\n| PBKDF2    | `PBKDF2`, `pbkdf2`, `#.pbkdf2`                                   | RFC-8081 |\n| scrypt    | `Scrypt`, `scrypt`,                                              | RFC-7914 |\n| bcrypt    | `Bcrypt`, `bcrypt`, `bcryptSalt`, `bcryptVerify`, `bcryptDigest` |          |\n\n### Message Authentication Code (MAC) Generators\n\n| Algorithms | Available methods                      | Source   |\n| ---------- | -------------------------------------- | -------- |\n| HMAC       | `HMAC`, `#.hmac`                       | RFC-2104 |\n| Poly1305   | `Poly1305`, `poly1305`, `poly1305auth` | RFC-8439 |\n\n### OTP generation for 2FA\n\n| Algorithms | Available methods | Source   |\n| ---------- | ----------------- | -------- |\n| HOTP       | `HOTP`            | RFC-4226 |\n| TOTP       | `TOTP`            | RFC-6238 |\n\n### Other Hash Algorithms\n\n| Algorithms | Available methods         | Source    |\n| ---------- | ------------------------- | --------- |\n| CRC        | `crc16`, `crc32`, `crc64` | Wikipedia |\n| Adler32    | `adler32`                 | Wikipedia |\n\n### Random Algorithm\n\n#### Random number generators\n\nAccessible through `HashlibRandom`:\n\n- secure\n- system\n- keccak\n- sha256\n- md5\n- xxh64\n- sm3\n\n#### UUID generators\n\nAccessible through `uuid`\n\n- v1\n- v3\n- v4\n- v5\n- v6\n- v7\n- v8\n\n\u003c!-- ## Demo\n\nA demo application is available in Google Play Store featuring the capabilities of this package.\n\n\u003ca href='https://play.google.com/store/apps/details?id=io.bitanon.hashlib_demo\u0026pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'\u003e\u003cimg alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' width=\"192px\" /\u003e\u003c/a\u003e\n\n\u003ca href='https://play.google.com/store/apps/details?id=io.bitanon.hashlib_demo\u0026pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'\u003e\u003cimg alt=\"demo app preview\" src=\"https://raw.githubusercontent.com/bitanon/hashlib_demo/master/images/demo.gif\" height=\"640px\"/\u003e\u003c/a\u003e --\u003e\n\n## Getting Started\n\nThe following import will give you access to all of the algorithms in this package.\n\n```dart\nimport 'package:hashlib/hashlib.dart' as hashlib;\n```\n\nCheck the [API Reference](https://pub.dev/documentation/hashlib/latest/) for details.\n\n## Usage\n\nExamples can be found inside the `example` folder.\n\n### Hashlib Example\n\n```dart\nimport 'package:hashlib/codecs.dart';\nimport 'package:hashlib/hashlib.dart';\n\nvoid main() {\n  var text = \"Happy Hashing!\";\n  print(\"text =\u003e $text\");\n\n  final key = \"password\";\n  final salt = \"some salt\";\n  print(\"key =\u003e $key\");\n  print(\"salt =\u003e $salt\");\n  print('');\n\n  final pw = key.codeUnits;\n  final iv = salt.codeUnits;\n\n  // Example of hash-code generations\n  print('XXH32 =\u003e ${xxh32code(text)}');\n  print('CRC32 =\u003e ${crc32code(text)}');\n  print('Adler32 =\u003e ${adler32code(text)}');\n  print('CRC16 =\u003e ${crc16code(text)}');\n  print('');\n\n  // Examples of Hash generation\n  print('CRC64 =\u003e ${crc64sum(text)}');\n  print('XXH64 =\u003e ${xxh64sum(text)}');\n  print('XXH3 =\u003e ${xxh3sum(text)}');\n  print('XXH128 =\u003e ${xxh128sum(text)}');\n  print('MD2 =\u003e ${md2.string(text)}');\n  print('MD4 =\u003e ${md4.string(text)}');\n  print('MD5 =\u003e ${md5.string(text)}');\n  print('SHA-1 =\u003e ${sha1.string(text)}');\n  print('SHA-224 =\u003e ${sha224.string(text)}');\n  print('SHA-256 =\u003e ${sha256.string(text)}');\n  print('SHA-384 =\u003e ${sha384.string(text)}');\n  print('SHA-512 =\u003e ${sha512.string(text)}');\n  print('SHA-512/224 =\u003e ${sha512t224.string(text)}');\n  print('SHA-512/256 =\u003e ${sha512t256.string(text)}');\n  print('SHA3-224 =\u003e ${sha3_224.string(text)}');\n  print('SHA3-256 =\u003e ${sha3_256.string(text)}');\n  print('SHA3-384 =\u003e ${sha3_384.string(text)}');\n  print('SHA3-512 =\u003e ${sha3_512.string(text)}');\n  print('Keccak-224 =\u003e ${keccak224.string(text)}');\n  print('Keccak-256 =\u003e ${keccak256.string(text)}');\n  print('Keccak-384 =\u003e ${keccak384.string(text)}');\n  print('Keccak-512 =\u003e ${keccak512.string(text)}');\n  print('SHAKE-128 =\u003e ${shake128.of(20).string(text)}');\n  print('SHAKE-256 =\u003e ${shake256.of(20).string(text)}');\n  print('BLAKE2s-256 =\u003e ${blake2s256.string(text)}');\n  print('BLAKE2b-512 =\u003e ${blake2b512.string(text)}');\n  print('SM3 =\u003e ${sm3.string(text)}');\n  print('');\n\n  // Examples of MAC generations\n  print('HMAC/MD5 =\u003e ${md5.hmac.by(pw).string(text)}');\n  print('HMAC/SHA1 =\u003e ${sha1.hmac.byString(text)}');\n  print('HMAC/SHA256 =\u003e ${sha256.hmac.byString(key).string(text)}');\n  print('HMAC/SHA3-256 =\u003e ${HMAC(sha3_256).by(pw).string(text)}');\n  print(\"HMAC/BLAKE2b-256 =\u003e ${blake2b512.hmac.by(pw).string(text)}\");\n  print(\"BLAKE-2b-MAC/256 =\u003e ${blake2b256.mac.by(pw).string(text)}\");\n  print(\"BLAKE-2b-MAC/224 =\u003e ${Blake2b(28).mac.by(pw).string(text)}\");\n  print('');\n\n  // Examples of OTP generation\n  int nw = DateTime.now().millisecondsSinceEpoch ~/ 30000;\n  var counter = fromHex(nw.toRadixString(16).padLeft(16, '0'));\n  print('TOTP[time=$nw] =\u003e ${TOTP(iv).value()}');\n  print('HOTP[counter=$nw] =\u003e ${HOTP(iv, counter: counter).value()}');\n  print('');\n}\n```\n\n### Key Generation Example\n\n```dart\nimport 'package:hashlib/hashlib.dart';\n\nvoid main() {\n  final key = \"password\";\n  final salt = \"some salt\";\n  print(\"key =\u003e $key\");\n  print(\"salt =\u003e $salt\");\n  print('');\n\n  final pw = key.codeUnits;\n  final iv = salt.codeUnits;\n\n  // Examples of Argon2 key derivation\n  final argon2Test = Argon2Security.test;\n  print(\"[Argon2i] =\u003e ${argon2i(pw, iv, security: argon2Test)}\");\n  print(\"[Argon2d] =\u003e ${argon2d(pw, iv, security: argon2Test)}\");\n  print(\"[Argon2id] =\u003e ${argon2id(pw, iv, security: argon2Test)}\");\n\n  // Examples of scrypt key derivation\n  final scryptLittle = ScryptSecurity.little;\n  print(\"[scrypt] =\u003e ${scrypt(pw, iv, security: scryptLittle, dklen: 24)}\");\n  print('');\n\n  // Examples of bcrypt key derivation\n  final bcryptLittle = BcryptSecurity.little;\n  print(\"[bcrypt] =\u003e ${bcrypt(pw, bcryptSalt(security: bcryptLittle))}\");\n  print('');\n\n  // Examples of PBKDF2 key derivation\n  print(\"SHA256/HMAC/PBKDF2 =\u003e ${pbkdf2(pw, iv).hex()}\");\n  print(\"BLAKE2b-256/HMAC/PBKDF2 =\u003e ${blake2b256.pbkdf2(iv).hex(pw)}\");\n  print(\"BLAKE2b-256/MAC/PBKDF2 =\u003e ${blake2b256.mac.pbkdf2(iv).hex(pw)}\");\n  print(\"SHA1/HMAC/PBKDF2 =\u003e ${sha1.pbkdf2(iv, iterations: 100).hex(pw)}\");\n  print('');\n}\n```\n\n### Random Example\n\n```dart\nimport 'package:hashlib/codecs.dart';\nimport 'package:hashlib/random.dart';\n\nvoid main() {\n  print('UUID Generation:');\n  print('UUIDv1: ${uuid.v1()}');\n  print('UUIDv3: ${uuid.v3()}');\n  print('UUIDv4: ${uuid.v4()}');\n  print('UUIDv5: ${uuid.v5()}');\n  print('UUIDv6: ${uuid.v6()}');\n  print('UUIDv7: ${uuid.v7()}');\n  print('UUIDv8: ${uuid.v8()}');\n  print('');\n\n  print('Random Generation:');\n  print(randomNumbers(4));\n  print(toHex(randomBytes(16)));\n  print(randomString(32, lower: true, whitelist: '_'.codeUnits));\n  print('');\n}\n```\n\n# Benchmarks\n\nLibraries:\n\n- **Hashlib** : https://pub.dev/packages/hashlib\n- **Crypto** : https://pub.dev/packages/crypto\n- **PointyCastle** : https://pub.dev/packages/pointycastle\n- **Hash** : https://pub.dev/packages/hash\n\n\u003chr/\u003e\n\nWith 5MB message (10 iterations):\n\n| Algorithms    | `hashlib`     | `PointyCastle`                 | `crypto`                    | `hash`                     |\n| ------------- | ------------- | ------------------------------ | --------------------------- | -------------------------- |\n| MD4           | **1.64 Gbps** | 352 Mbps \u003cbr\u003e `4.66x slow`     |                             |                            |\n| MD5           | **1.45 Gbps** | 347 Mbps \u003cbr\u003e `4.18x slow`     | 1.01 Gbps \u003cbr\u003e `1.44x slow` | 651 Mbps \u003cbr\u003e `2.23x slow` |\n| HMAC(MD5)     | **1.33 Gbps** |                                | 991 Mbps \u003cbr\u003e `1.34x slow`  | 653 Mbps \u003cbr\u003e `2.04x slow` |\n| SHA-1         | **1.27 Gbps** | 248 Mbps \u003cbr\u003e `5.13x slow`     | 794 Mbps \u003cbr\u003e `1.61x slow`  | 388 Mbps \u003cbr\u003e `3.28x slow` |\n| HMAC(SHA-1)   | **1.28 Gbps** |                                | 793 Mbps \u003cbr\u003e `1.61x slow`  |                            |\n| SHA-224       | **856 Mbps**  | 152 Mbps \u003cbr\u003e `5.65x slow`     | 685 Mbps \u003cbr\u003e `1.25x slow`  | 198 Mbps \u003cbr\u003e `4.32x slow` |\n| SHA-256       | **859 Mbps**  | 151 Mbps \u003cbr\u003e `5.67x slow`     | 686 Mbps \u003cbr\u003e `1.25x slow`  | 198 Mbps \u003cbr\u003e `4.35x slow` |\n| HMAC(SHA-256) | **858 Mbps**  |                                | 688 Mbps \u003cbr\u003e `1.25x slow`  |                            |\n| SHA-384       | **1.36 Gbps** | 17.35 Mbps \u003cbr\u003e `78.24x slow`  | 466 Mbps \u003cbr\u003e `2.91x slow`  | 162 Mbps \u003cbr\u003e `8.37x slow` |\n| SHA-512       | **1.36 Gbps** | 17.59 Mbps \u003cbr\u003e `77.15x slow`  | 470 Mbps \u003cbr\u003e `2.89x slow`  | 160 Mbps \u003cbr\u003e `8.46x slow` |\n| SHA3-224      | **857 Mbps**  | 14.97 Mbps \u003cbr\u003e `57.25x slow`  |                             |                            |\n| SHA3-256      | **857 Mbps**  | 14.17 Mbps \u003cbr\u003e `60.48x slow`  |                             |                            |\n| SHA3-384      | **1.36 Gbps** | 10.85 Mbps \u003cbr\u003e `125.22x slow` |                             |                            |\n| SHA3-512      | **1.37 Gbps** | 7.49 Mbps \u003cbr\u003e `182.3x slow`   |                             |                            |\n| RIPEMD-128    | **1.79 Gbps** | 247 Mbps \u003cbr\u003e `7.24x slow`     |                             |                            |\n| RIPEMD-160    | **698 Mbps**  | 174 Mbps \u003cbr\u003e `4x slow`        |                             | 290 Mbps \u003cbr\u003e `2.41x slow` |\n| RIPEMD-256    | **2 Gbps**    | 218 Mbps \u003cbr\u003e `9.16x slow`     |                             |                            |\n| RIPEMD-320    | **684 Mbps**  | 161 Mbps \u003cbr\u003e `4.26x slow`     |                             |                            |\n| BLAKE-2s      | **1.49 Gbps** |                                |                             |                            |\n| BLAKE-2b      | **1.53 Gbps** | 71.06 Mbps \u003cbr\u003e `21.6x slow`   |                             |                            |\n| Poly1305      | **3.79 Gbps** | 362 Mbps \u003cbr\u003e `10.48x slow`    |                             |                            |\n| XXH32         | **4.5 Gbps**  |                                |                             |                            |\n| XXH64         | **2.42 Gbps** |                                |                             |                            |\n| XXH3          | **976 Mbps**  |                                |                             |                            |\n| XXH128        | **1.03 Gbps** |                                |                             |                            |\n| SM3           | **751 Mbps**  | 135 Mbps \u003cbr\u003e `5.57x slow`     |                             |                            |\n\n\u003chr/\u003e\n\nWith 1KB message (5000 iterations):\n\n| Algorithms    | `hashlib`     | `PointyCastle`                 | `crypto`                   | `hash`                     |\n| ------------- | ------------- | ------------------------------ | -------------------------- | -------------------------- |\n| MD4           | **1.54 Gbps** | 576 Mbps \u003cbr\u003e `2.67x slow`     |                            |                            |\n| MD5           | **1.37 Gbps** | 514 Mbps \u003cbr\u003e `2.66x slow`     | 916 Mbps \u003cbr\u003e `1.49x slow` | 643 Mbps \u003cbr\u003e `2.12x slow` |\n| HMAC(MD5)     | **1 Gbps**    |                                | 735 Mbps \u003cbr\u003e `1.36x slow` | 482 Mbps \u003cbr\u003e `2.08x slow` |\n| SHA-1         | **1.16 Gbps** | 348 Mbps \u003cbr\u003e `3.33x slow`     | 714 Mbps \u003cbr\u003e `1.62x slow` | 371 Mbps \u003cbr\u003e `3.12x slow` |\n| HMAC(SHA-1)   | **784 Mbps**  |                                | 505 Mbps \u003cbr\u003e `1.55x slow` |                            |\n| SHA-224       | **780 Mbps**  | 177 Mbps \u003cbr\u003e `4.41x slow`     | 616 Mbps \u003cbr\u003e `1.27x slow` | 187 Mbps \u003cbr\u003e `4.18x slow` |\n| SHA-256       | **784 Mbps**  | 175 Mbps \u003cbr\u003e `4.48x slow`     | 615 Mbps \u003cbr\u003e `1.27x slow` | 187 Mbps \u003cbr\u003e `4.19x slow` |\n| HMAC(SHA-256) | **549 Mbps**  |                                | 433 Mbps \u003cbr\u003e `1.27x slow` |                            |\n| SHA-384       | **1.13 Gbps** | 26.94 Mbps \u003cbr\u003e `42.01x slow`  | 402 Mbps \u003cbr\u003e `2.82x slow` | 169 Mbps \u003cbr\u003e `6.71x slow` |\n| SHA-512       | **1.13 Gbps** | 27.88 Mbps \u003cbr\u003e `40.48x slow`  | 402 Mbps \u003cbr\u003e `2.81x slow` | 170 Mbps \u003cbr\u003e `6.64x slow` |\n| SHA3-224      | **782 Mbps**  | 20.34 Mbps \u003cbr\u003e `38.46x slow`  |                            |                            |\n| SHA3-256      | **783 Mbps**  | 20.55 Mbps \u003cbr\u003e `38.11x slow`  |                            |                            |\n| SHA3-384      | **1.13 Gbps** | 16.25 Mbps \u003cbr\u003e `69.21x slow`  |                            |                            |\n| SHA3-512      | **1.13 Gbps** | 10.89 Mbps \u003cbr\u003e `103.51x slow` |                            |                            |\n| RIPEMD-128    | **1.62 Gbps** | 334 Mbps \u003cbr\u003e `4.87x slow`     |                            |                            |\n| RIPEMD-160    | **642 Mbps**  | 207 Mbps \u003cbr\u003e `3.1x slow`      |                            | 280 Mbps \u003cbr\u003e `2.29x slow` |\n| RIPEMD-256    | **1.81 Gbps** | 339 Mbps \u003cbr\u003e `5.34x slow`     |                            |                            |\n| RIPEMD-320    | **636 Mbps**  | 198 Mbps \u003cbr\u003e `3.22x slow`     |                            |                            |\n| BLAKE-2s      | **1.43 Gbps** |                                |                            |                            |\n| BLAKE-2b      | **1.47 Gbps** | 95.76 Mbps \u003cbr\u003e `15.38x slow`  |                            |                            |\n| Poly1305      | **3.33 Gbps** | 768 Mbps \u003cbr\u003e `4.33x slow`     |                            |                            |\n| XXH32         | **4.12 Gbps** |                                |                            |                            |\n| XXH64         | **2.27 Gbps** |                                |                            |                            |\n| XXH3          | **784 Mbps**  |                                |                            |                            |\n| XXH128        | **825 Mbps**  |                                |                            |                            |\n| SM3           | **698 Mbps**  | 163 Mbps \u003cbr\u003e `4.28x slow`     |                            |                            |\n\n\u003chr/\u003e\n\nWith 10B message (100000 iterations):\n\n| Algorithms    | `hashlib`      | `PointyCastle`               | `crypto`                     | `hash`                       |\n| ------------- | -------------- | ---------------------------- | ---------------------------- | ---------------------------- |\n| MD4           | **210 Mbps**   | 101 Mbps \u003cbr\u003e `2.09x slow`   |                              |                              |\n| MD5           | **177 Mbps**   | 89.19 Mbps \u003cbr\u003e `1.98x slow` | 92.89 Mbps \u003cbr\u003e `1.9x slow`  | 52.25 Mbps \u003cbr\u003e `3.38x slow` |\n| HMAC(MD5)     | **36.18 Mbps** |                              | 31.69 Mbps \u003cbr\u003e `1.14x slow` | 14.23 Mbps \u003cbr\u003e `2.54x slow` |\n| SHA-1         | **120 Mbps**   | 49.47 Mbps \u003cbr\u003e `2.42x slow` | 69.51 Mbps \u003cbr\u003e `1.72x slow` | 34.29 Mbps \u003cbr\u003e `3.49x slow` |\n| HMAC(SHA-1)   | **19.64 Mbps** |                              | 14.71 Mbps \u003cbr\u003e `1.34x slow` |                              |\n| SHA-224       | **88.2 Mbps**  | 26.95 Mbps \u003cbr\u003e `3.27x slow` | 58.57 Mbps \u003cbr\u003e `1.51x slow` | 21.69 Mbps \u003cbr\u003e `4.07x slow` |\n| SHA-256       | **88.39 Mbps** | 27.12 Mbps \u003cbr\u003e `3.26x slow` | 60.75 Mbps \u003cbr\u003e `1.45x slow` | 22.48 Mbps \u003cbr\u003e `3.93x slow` |\n| HMAC(SHA-256) | **14.35 Mbps** |                              | 12.45 Mbps \u003cbr\u003e `1.15x slow` |                              |\n| SHA-384       | **65.18 Mbps** | 2.33 Mbps \u003cbr\u003e `27.95x slow` | 26.99 Mbps \u003cbr\u003e `2.42x slow` | 11.16 Mbps \u003cbr\u003e `5.84x slow` |\n| SHA-512       | **64.21 Mbps** | 2.35 Mbps \u003cbr\u003e `27.3x slow`  | 26.59 Mbps \u003cbr\u003e `2.41x slow` | 11.39 Mbps \u003cbr\u003e `5.64x slow` |\n| SHA3-224      | **88.02 Mbps** | 1.57 Mbps \u003cbr\u003e `55.89x slow` |                              |                              |\n| SHA3-256      | **89.16 Mbps** | 1.56 Mbps \u003cbr\u003e `57.23x slow` |                              |                              |\n| SHA3-384      | **64.5 Mbps**  | 1.57 Mbps \u003cbr\u003e `41.07x slow` |                              |                              |\n| SHA3-512      | **63.11 Mbps** | 1.57 Mbps \u003cbr\u003e `40.2x slow`  |                              |                              |\n| RIPEMD-128    | **177 Mbps**   | 58.35 Mbps \u003cbr\u003e `3.03x slow` |                              |                              |\n| RIPEMD-160    | **86.81 Mbps** | 33.18 Mbps \u003cbr\u003e `2.62x slow` |                              | 32.16 Mbps \u003cbr\u003e `2.7x slow`  |\n| RIPEMD-256    | **180 Mbps**   | 53.17 Mbps \u003cbr\u003e `3.39x slow` |                              |                              |\n| RIPEMD-320    | **85.18 Mbps** | 30.48 Mbps \u003cbr\u003e `2.79x slow` |                              |                              |\n| BLAKE-2s      | **152 Mbps**   |                              |                              |                              |\n| BLAKE-2b      | **120 Mbps**   | 6.89 Mbps \u003cbr\u003e `17.44x slow` |                              |                              |\n| Poly1305      | **269 Mbps**   | 167 Mbps \u003cbr\u003e `1.61x slow`   |                              |                              |\n| XXH32         | **413 Mbps**   |                              |                              |                              |\n| XXH64         | **332 Mbps**   |                              |                              |                              |\n| XXH3          | **32.94 Mbps** |                              |                              |                              |\n| XXH128        | **33.16 Mbps** |                              |                              |                              |\n| SM3           | **93.33 Mbps** | 24.81 Mbps \u003cbr\u003e `3.76x slow` |                              |                              |\n\n\u003chr/\u003e\n\nKey derivator algorithm benchmarks on different security parameters:\n\n| Algorithms | little   | moderate  | good       | strong      |\n| ---------- | -------- | --------- | ---------- | ----------- |\n| scrypt     | 1.092 ms | 11.899 ms | 69.138 ms  | 2100.983 ms |\n| bcrypt     | 1.803 ms | 14.474 ms | 226.341 ms | 1811.425 ms |\n| pbkdf2     | 0.668 ms | 16.363 ms | 267.526 ms | 3211.098 ms |\n| argon2i    | 2.359 ms | 17.448 ms | 205.518 ms | 2375.301 ms |\n| argon2d    | 2.272 ms | 16.064 ms | 201.827 ms | 2374.41 ms  |\n| argon2id   | 2.306 ms | 16.38 ms  | 199.66 ms  | 2376.102 ms |\n\n\u003e All benchmarks are done on _AMD Ryzen 7 5800X_ processor and _3200MHz_ RAM using compiled _exe_\n\u003e\n\u003e Dart SDK version: 3.7.0 (stable) (Wed Feb 5 04:53:58 2025 -0800) on \"windows_x64\"\n","funding_links":["https://paypal.me/bitan0n"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitanon%2Fhashlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitanon%2Fhashlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitanon%2Fhashlib/lists"}