pointycastle
4.0.0, released 2 years ago by bouncycastle.org
A Dart library providing a wide range of cryptographic algorithms and primitives.
What it does
Implements block ciphers, stream ciphers, digests, MACs, signatures, key derivation functions, and secure random generators. The API mirrors Bouncy Castle, allowing algorithm selection via a registry or direct constructors.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need cryptographic operations (encryption, hashing, signing) in a pure‑Dart project
- You require support for many algorithms (AES, RSA, SHA‑256, etc.) without native code
- You want a null‑safe, actively maintained library
Skip it when
- You need hardware‑accelerated crypto or platform‑specific APIs
- You prefer a smaller, single‑algorithm package
Strengths
- Broad algorithm coverage
- Pure Dart, works on all Flutter platforms
- Null‑safe and actively maintained
Weaknesses
- Large API surface can be overwhelming
- No hardware acceleration, may be slower than native libs
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
import 'package:pointycastle/pointycastle.dart';
final digest = Digest('SHA-256');
final bytes = Uint8List.fromList('hello'.codeUnits);
final hash = digest.process(bytes);
print(hash);
Alternatives
Packages that do the same job and could replace pointycastle.
- webcrypto
Cross-platform implementation of Web Cryptography APIs for Dart.
89Compare - crypto
Provides SHA, MD5, and HMAC hashing functions for Dart.
96Compare - cryptography_plus
Cryptographic algorithms for encryption, signatures, key agreement, and hashing across platforms.
68Compare - cryptography
Cross‑platform cryptographic algorithms for Dart and Flutter.
67Compare
Works with
Packages commonly used together with pointycastle: ones it builds on, ones built on it, and its own family.
- convertpointycastle depends on itEncoders and decoders for converting between different data representations.
- dart_jsonwebtokenBuilt on pointycastleA Dart library for creating, signing, decoding and verifying JSON Web Tokens (JWT).
- encryptBuilt on pointycastleHigh‑level Dart APIs for encryption, decryption, signing and secure random generation.
- crypto_keysBuilt on pointycastleLibrary for signing, verifying, encrypting and decrypting using pointycastle.
- basic_utilsBuilt on pointycastleCommon utility classes for Strings, Dates, X509, PKCS, Cryptography and HTTP requests.
- dartssh2Built on pointycastleSSH and SFTP client written in pure Dart
- encrypter_plusBuilt on pointycastleHigh-level APIs over PointyCastle for two-way cryptography, supporting AES, RSA, Salsa20, and Fernet.
- objectbox_generatorBuilt on pointycastleGenerates ObjectBox binding code for annotated Dart entities.