smart_encrypt 1.0.6 copy "smart_encrypt: ^1.0.6" to clipboard
smart_encrypt: ^1.0.6 copied to clipboard

library for easy use encrypt & decrypt features, generate bytes & string

example/smart_encrypt_example.dart

import 'dart:io';
import 'dart:typed_data';

import 'package:smart_encrypt/smart_encrypt.dart';

void main() async {
  print(SmartEncrypt.getRandomNumbers(24));
  print(SmartEncrypt.getRandomString(30));
  print(SmartEncrypt.createDataHash256('Hello world'));

  String str = 'Hello world';
  Uint8List key = SmartEncrypt.createKey();
  Uint8List iv = SmartEncrypt.createIV();

  str = SmartEncrypt.encrypt(str, key, iv);
  print(str);
  print(SmartEncrypt.decrypt(str, key, iv));
  List<int> yourFileBites = await File('your file path').readAsBytes();
  print('encrypt start');
  List<int> encryptedFileBites =
      await SmartEncrypt.fastEncryptFile(yourFileBites, 250);
  print('encrypt end');
  await SmartEncrypt.fastDecryptFile(encryptedFileBites, 250)
      .then((value) => print('decrypted'));
}
3
likes
0
points
32
downloads

Publisher

verified publisheranykeylib.ru

Weekly Downloads

library for easy use encrypt & decrypt features, generate bytes & string

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, encrypt

More

Packages that depend on smart_encrypt