crypton
2.2.1, released 3 years ago by konstantinullrich.de
A simple Dart library for asymmetric encryption and digital signatures.
What it does
Crypton provides a simplified interface to interact with PointyCastle for asymmetric encryption, decryption, and digital signatures. It supports generating random RSA and EC keypairs, signing strings, validating signatures, and handling RSA string encryption.
AI-written summary of version 2.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to implement RSA encryption or decryption for strings.
- You need to generate random RSA or EC keypairs and handle digital signatures.
Skip it when
- You need symmetric encryption or hashing (the author recommends steel_crypt instead).
Strengths
- Provides a simplified wrapper around complex PointyCastle operations.
- Supports both RSA and EC keypair generation and signing.
Weaknesses
- Not recommended for symmetric encryption or hashing.
- Limited feature scope focused strictly on basic asymmetric operations.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
RSAKeypair rsaKeypair = RSAKeypair.fromRandom();
String encrypted = rsaKeypair.publicKey.encrypt('Hello World');
String decrypted = rsaKeypair.privateKey.decrypt(encrypted);Alternatives
Packages that do the same job and could replace crypton.
- cryptography_plus
Cryptographic algorithms for encryption, signatures, key agreement, and hashing across platforms.
68Compare - cryptography
Cross‑platform cryptographic algorithms for Dart and Flutter.
67Compare - ecdsa
Implements ECDSA signing and verification in pure Dart.
66Compare - xml_crypto
Xml digital signature library for Dart for signing and verifying XML documents.
60Compare
Works with
Packages commonly used together with crypton: ones it builds on, ones built on it, and its own family.
- pointycastlecrypton depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- asn1libcrypton depends on itEncodes and decodes ASN.1 objects using BER byte encoding in Dart.
- at_clientBuilt on cryptonClient SDK for building apps on the atProtocol with end-to-end encryption.
- nextcloudBuilt on cryptonA Nextcloud API client written in Dart supporting maintained server versions.