Update: 2026-08-02 17:52:28
This commit is contained in:
@@ -42,6 +42,15 @@ class EncryptionHelper {
|
||||
debugPrint("EncryptionHelper initialized successfully.");
|
||||
}
|
||||
|
||||
/// Encrypts a string using AES-256-CBC with constant IV (deterministic)
|
||||
/// Same input always produces the same output
|
||||
String encryptDataCbc(String plainText) {
|
||||
final cbcEncrypter =
|
||||
encrypt.Encrypter(encrypt.AES(key, mode: encrypt.AESMode.cbc));
|
||||
final encrypted = cbcEncrypter.encrypt(plainText, iv: iv);
|
||||
return encrypted.base64;
|
||||
}
|
||||
|
||||
/// ✅ FIX H-04: Encrypts a string using AES-256-GCM (new) with random IV
|
||||
String encryptData(String plainText) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user