Exemplo n.º 1
0
        public async Task <T> GetCache()
        {
            T data = default;

            if (await _folder.TryGetItemAsync(_fileName) is StorageFile file)
            {
                var encryptedData = await GetBytesAsync(file);

                var serializedData = await _encryptionManager.DecryptV2(encryptedData, false);

                data = Deserialize(Encoding.UTF8.GetString(serializedData));
            }
            return(data);
        }