cipherlib 0.0.2-pre copy "cipherlib: ^0.0.2-pre" to clipboard
cipherlib: ^0.0.2-pre copied to clipboard

retracted

Implementations of cryptographic algorithms for encryption and decryption in Dart.

cipherlib #

plugin version dependencies dart support likes pub points popularity

Implementations of cryptographic algorithms for encryption and decryption in Dart.

Features #

Ciphers Available methods Source
XOR XOR, xor, xorPipe Wikipedia

Getting started #

The following import will give you access to all of the algorithms in this package.

import 'package:cipherlib/cipherlib.dart';

Check the API Reference for details.

Usage #

Examples can be found inside the example folder.

import 'package:cipherlib/cipherlib.dart';
import 'package:cipherlib/cipherlib.dart';

void main() {
  var key = [0x54];
  var inp = [0x03, 0xF1];
  print('text: ${toBinary(inp)}');
  print(' key: ${toBinary(key)}');
  print(' XOR: ${toBinary(xor(inp, key))}');
}

Benchmarks #

Libraries:

With 5MB message (10 iterations):

Algorithms cipherlib[key:10B] cipherlib[key:1KB] cipherlib[key:5MB]
XOR 246.28MB/s 245.36MB/s 245.48MB/s
XOR(pipe) 70.81TB/s 70.98TB/s 70.84TB/s

With 1KB message (5000 iterations):

Algorithms cipherlib[key:10B] cipherlib[key:1KB] cipherlib[key:5MB]
XOR 256.42MB/s 256.41MB/s 256.65MB/s
XOR(pipe) 14.34GB/s 14.38GB/s 14.44GB/s
1% faster

With 10B message (100000 iterations):

Algorithms cipherlib[key:10B] cipherlib[key:1KB] cipherlib[key:5MB]
XOR 185.24MB/s 186.45MB/s
1% faster
186.28MB/s
1% faster
XOR(pipe) 144.20MB/s 143.58MB/s 141.57MB/s
2% slower

All benchmarks are done on AMD Ryzen 7 5800X processor and 3200MHz RAM using compiled exe

Dart SDK version: 3.3.3 (stable) (Tue Mar 26 14:21:33 2024 +0000) on "windows_x64"

4
likes
0
points
62
downloads

Publisher

unverified uploader

Weekly Downloads

Implementations of cryptographic algorithms for encryption and decryption in Dart.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

paypal.me

License

unknown (license)

Dependencies

hashlib, hashlib_codecs

More

Packages that depend on cipherlib