Flutter Firebase | end to end Encryption

Publicado el: 04 enero 2023
en el canal de: Shram HaWrami
993
14

Package: https://pub.dev/packages/encrypt

Facebook: https://www.facebook.com/shram007?mib...

Facebook Group: https://fb.me/g/p_3mqtV1Dh89VRziWT/zP...

Instagram:   / shramhawraami  

Twitter: https://twitter.com/shram_007?fbclid=...

sound:    • crystal castles - leni  
ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
Code:
static encryptWithAESKey(String data) {
encrypt.Key aesKey = encrypt.Key.fromLength(16);
final encrypter = encrypt.Encrypter(encrypt.AES(aesKey));
if (data.isNotEmpty) {
encrypt.Encrypted encryptedData =
encrypter.encrypt(data, iv: encrypt.IV.fromLength(16));
return encryptedData.base64;
} else if (data.isEmpty) {
// ignore: avoid_print
print('Data is empty');
}
}

static decryptWithAESKey(String data) {
encrypt.Key aesKey = encrypt.Key.fromLength(16);
final encrypter = encrypt.Encrypter(encrypt.AES(aesKey));
encrypt.Encrypted encrypted = encrypt.Encrypted.fromBase64(data);
if (data.isNotEmpty) {
String decryptedData =
encrypter.decrypt(encrypted, iv: encrypt.IV.fromLength(16));
return decryptedData;
} else if (data.isEmpty) {
print('Chats is empty');
}
}


En esta página del sitio puede ver el video en línea Flutter Firebase | end to end Encryption de Duración hora minuto segunda en buena calidad , que subió el usuario Shram HaWrami 04 enero 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 993 veces y le gustó 14 a los espectadores. Disfruta viendo!