cryptdart 0.1.1 copy "cryptdart: ^0.1.1" to clipboard
cryptdart: ^0.1.1 copied to clipboard

A Dart project under LGPL-3.0 license.

CryptDart #

pub package license

Unified cryptography library for Dart. Provides easy-to-use interfaces for symmetric/asymmetric encryption, digital signatures, and key management. Built on PointyCastle and BasicUtils.

Features #

  • Symmetric encryption: AES, TripleDES, ChaCha20
  • Asymmetric encryption: RSA
  • Digital signatures: HMAC, RSA signature
  • Key generation and management
  • Expiration logic for keys and ciphers
  • Centralized utilities for encoding, random generation, and PEM parsing

Installation #

Add to your pubspec.yaml:

dependencies:
	cryptdart: ^1.0.0

Run:

dart pub get

Usage Example #

import 'package:cryptdart/cryptdart.dart';

void main() async {
	// Generate AES key
	final aesKey = AESCipher.generateKey();
	final cipher = AESCipher((parent: (key: aesKey)));
	final encrypted = cipher.encrypt([1, 2, 3, 4]);
	final decrypted = cipher.decrypt(encrypted);

	// Generate RSA key pair
	final rsaKeys = await RSACipher.generateKeyPair();
	final rsaCipher = RSACipher((parent: (publicKey: rsaKeys['publicKey']!, privateKey: rsaKeys['privateKey']!)));
	final rsaEncrypted = rsaCipher.encrypt([1, 2, 3, 4]);
	final rsaDecrypted = rsaCipher.decrypt(rsaEncrypted);
}

Documentation #

See API reference for details.

License #

This project is licensed under the GNU Lesser General Public License v3.0. See the LICENSE file for details.

0
likes
0
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart project under LGPL-3.0 license.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

basic_utils, meta, pointycastle

More

Packages that depend on cryptdart