xor_cipher 1.0.0+1 copy "xor_cipher: ^1.0.0+1" to clipboard
xor_cipher: ^1.0.0+1 copied to clipboard

The XOR Encryption algorithm is a effective and easy to implement method of symmetric encryption.

example/xor_cipher_example.dart

// ignore_for_file: avoid_print

import 'package:xor_cipher/xor_cipher.dart';

void main() {
  const source = 'Hello 🦊 world!!!';
  const secret = 'Top 😺 secret';
  print(
    'Source: $source\n'
    'Secret: $secret',
  );
  final encrypted = XOR.encrypt(source, secret, urlEncode: true);
  print('Encrypted: $encrypted');
  final decrypted = XOR.decrypt(encrypted, secret, urlDecode: true);
  print(
    'Decrypted: $decrypted\n'
    'Identical: ${identical(source, decrypted)}',
  );
}
7
likes
150
pub points
77%
popularity

Publisher

verified publisherplugfox.dev

The XOR Encryption algorithm is a effective and easy to implement method of symmetric encryption.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on xor_cipher