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

CryptDart is a unified cryptography library for Dart, providing easy-to-use interfaces for symmetric and asymmetric encryption, digital signatures (including ECDSA), and key management. Built on Point [...]

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 #

  • Digital signatures: HMAC, RSA signature, ECDSA

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);
  
		// ECDSA sign/verify
		final ecdsaSign = ECDSASign((parent: (publicKey: '...', privateKey: '...'))); // Inserisci chiavi PEM
		final signature = ecdsaSign.sign([1, 2, 3, 4]);
		final verified = ecdsaSign.verifySignature([1, 2, 3, 4], signature);
		print('ECDSA signature verified: $verified');
}

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

CryptDart is a unified cryptography library for Dart, providing easy-to-use interfaces for symmetric and asymmetric encryption, digital signatures (including ECDSA), and key management. Built on PointyCastle and BasicUtils, LGPL-3.0.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

basic_utils, meta, pointycastle

More

Packages that depend on cryptdart