my_salt 1.0.1+2 copy "my_salt: ^1.0.1+2" to clipboard
my_salt: ^1.0.1+2 copied to clipboard

MySalt provides AES encryption and decryption with a secure passphrase, ensuring data security with a salt mechanism.

MySalt - AES Encryption & Decryption #

Features #

  • AES encryption and decryption with a secure passphrase.
  • Uses a salt mechanism to ensure different encrypted outputs.
  • Provides functions to verify encrypted data.

Getting started #

Prerequisites #

Ensure you have Flutter installed and add the required dependencies in your pubspec.yaml file:

dependencies:
  my_salt: ^1.0.0

Run the following command to install dependencies:

flutter pub get

Usage #

1. Import Required Packages #

import 'package:my_salt/my_salt.dart';

2. Initialize MySalt #

final mySalt = MySalt();
const String passphrase = "my_secure_password";
const String originalText = "Hello, this is a secret message!";

3. Encrypt Data #

String encryptedText = mySalt.encryptAESCryptoJS(originalText, passphrase);
print("Encrypted Text: $encryptedText");

4. Decrypt Data #

String decryptedText = mySalt.decryptAESCryptoJS(encryptedText, passphrase);
print("Decrypted Text: $decryptedText");

5. Verify Data #

bool isVerified = mySalt.verify(
  text: originalText,
  encrypted: encryptedText,
  passphrase: passphrase,
);
print("Verification Result: $isVerified");

6. Check If Two Encrypted Texts Are Identical #

String encryptedText2 = mySalt.encryptAESCryptoJS(originalText, passphrase);
bool isEncryptedEqual = mySalt.verifyEncrypted(
  encrypted1: encryptedText,
  encrypted2: encryptedText2,
  passphrase: passphrase,
);
print("Are the encrypted texts equal? $isEncryptedEqual");

Additional information #

Developer Team: #

Any comments please contact us ThaoDoan and DucNguyen

Buy Me A Coffee

Support Me on Ko-fi

1
likes
160
points
12
downloads
screenshot

Publisher

verified publisherwongcoupon.com

Weekly Downloads

MySalt provides AES encryption and decryption with a secure passphrase, ensuring data security with a salt mechanism.

Repository (GitHub)

Topics

#password #salt-password #security #security-salt #encryption

Documentation

API reference

Funding

Consider supporting this project:

buymeacoffee.com
ko-fi.com

License

MIT (license)

Dependencies

crypto, encrypt

More

Packages that depend on my_salt