LoginPage #54

Merged
maen0574 merged 7 commits from LoginPage into master 2022-05-30 17:09:44 +02:00
Showing only changes of commit fec6bef35f - Show all commits

View File

@ -4,22 +4,13 @@ class EncryptData{
//for AES Algorithms
static Encrypted? encrypted;
static var decrypted;
static encryptAES(plainText){
final key = Key.fromUtf8('my 32 length key................');
final key = Key.fromUtf8('my32lengthsupersecretnooneknows1');
final iv = IV.fromLength(16);
final encrypter = Encrypter(AES(key));
encrypted = encrypter.encrypt(plainText, iv: iv);
return encrypted!.base64;
}
static decryptAES(plainText){
final key = Key.fromUtf8('my 32 length key................');
final iv = IV.fromLength(16);
final encrypter = Encrypter(AES(key));
decrypted = encrypter.decrypt(encrypted!, iv: iv);
return decrypted;
}
}