Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Apr 17, 2020
1 parent 820384b commit 78e852c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DeviceTests/DeviceTests.Shared/SecureStorage_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,11 @@ public async Task Asymmetric_to_Symmetric_API_Upgrade()
[InlineData("test-key", "value1")]
public async Task Legacy_Key(string key, string data)
{
byte[] encryptedData = null;
var ks = new AndroidKeyStore(Platform.AppContext, SecureStorage.Alias, SecureStorage.AlwaysUseAsymmetricKeyStorage);
encryptedData = ks.Encrypt(data);
var encryptedData = ks.Encrypt(data);

var encStr = System.Convert.ToBase64String(encryptedData);
Preferences.Set(Xamarin.Essentials.Utils.Md5Hash(key), encStr, SecureStorage.Alias);
Preferences.Set(SecureStorage.Md5Hash(key), encStr, SecureStorage.Alias);

// Ensure we read back out the right key
var c = await SecureStorage.GetAsync(key);
Expand Down

0 comments on commit 78e852c

Please sign in to comment.