Fixed issues encryption screen

This commit is contained in:
Juan Gilsanz Polo 2023-03-24 21:48:34 +01:00
parent c13ba9e725
commit 759c977975
6 changed files with 54 additions and 10 deletions

16
lib/functions/base64.dart Normal file
View file

@ -0,0 +1,16 @@
import 'dart:convert';
String encodeBase64UserPass(String user, String pass) {
String credentials = "$user:$pass";
Codec<String, String> stringToBase64 = utf8.fuse(base64);
return stringToBase64.encode(credentials);
}
String encodeBase64(String value) {
Codec<String, String> stringToBase64 = utf8.fuse(base64);
return stringToBase64.encode(value);
}
String decodeBase64(String value) {
return utf8.decode(base64.decode(value));
}