criptografar static method
Implementation
static String criptografar(String texto) {
return texto;
/*
String a1 = Random().nextInt(1).toString();
String b2 = Random().nextInt(9).toString();
int pos = int.parse((a1 + b2));
String keyselecionada = keys[pos];
final key = Key.fromUtf8(keyselecionada);
final iv = IV.fromLength(16);
final encrypter = Encrypter(AES(key, mode: AESMode.ecb));
final res = encrypter.encrypt(texto, iv: iv);
final a = res.base16 + a1 + b2;
return a;
/*int a, b, c, i;
int numero;
String result = "";
List<int> bytetexto = utf8.encode(removeDiacritics(texto));
List<int> bytekey = utf8.encode(key);
for (i = 1; i <= texto.length; i++) {
if (key.length > 0) {
numero = 1 + ((i - 1) % key.length);
a = bytekey[numero - 1];
b = bytetexto[i - 1];
c = a ^ (b);
} else {
c = bytetexto[i];
}
result = result + HEX.encode([c]);
}
result = result + a1 + b2;
return result;
*/
*/
}