Last updated:
0 purchases
secure compressor
secure-compressor #
secure_compressor is a Dart package that provides utilities for securely encrypting, decrypting, compressing, and decompressing string data using AES encryption and gzip compression.
Features #
Encrypt and decrypt string data using AES encryption.
Compress and decompress string data using gzip.
Combine encryption and compression for secure and efficient data storage and transmission.
Save encrypted and compressed data to local storage.
Share encrypted and compressed data to media platform device (WA, email, etc).
Installation #
Add the following to your pubspec.yaml file:
dependencies:
secure_compressor: <Latest-Version>
copied to clipboard
Then, run flutter pub get to fetch the package.
Usages #
::: Notes :::
- keyString must be 32 character
- Initialization Vector (IV) [ivString] must be 16 character
copied to clipboard
Encrypt #
Encrypt a string using AES encryption:
final result = await SecureCompressor.encrypt(data, keyString, ivString: ivString);
copied to clipboard
Compress and then encrypt a string:
final result = await SecureCompressor.compressAndEncrypt(data, keyString, ivString: ivString);
copied to clipboard
Decrypt #
Decrypt an AES encrypted string:
final result = SecureCompressor.decrypt(encryptedData, keyString, ivString: ivString);
copied to clipboard
Decrypt and then uncompress a string:
final result = SecureCompressor.uncompressAndDecrypt(compressedAndEncryptedData, keyString, ivString: ivString);
copied to clipboard
Save Data to Local Storage #
Save data to a local file:
SecureCompressor.saveDataToLocal(fileName, data);
copied to clipboard
Share Data to Media Platform Device (WA, email, etc) #
Share data to a media platform device:
SecureCompressor.shareFile(fileName, data);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.