getEncFileList method
Implementation
Future<List> getEncFileList() async {
List encFileList;
/// Get the encryption key
String encKey = getEncKeyStorage();
/// Get the list of locations of files that are encrypted
var keyInfo = await fetchFile(encKeyFileLoc);
EncProfile keyFile = EncProfile(keyInfo.toString());
String encFileHash = keyFile.getEncFileHash();
String encFileIv = keyFile.getEncIvVal();
if (encFileHash.isEmpty) {
encFileList = [];
} else {
String encFilePlaintext = decryptVal(encKey, encFileHash, encFileIv);
encFileList = jsonDecode(encFilePlaintext);
}
return encFileList;
}