1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-10 13:23:39 +00:00

[PM-2713] make method async again

- returning null from a task thats not async throws
This commit is contained in:
Jacob Fink
2023-08-03 15:44:41 -04:00
parent c595b1626e
commit e820408a64

View File

@@ -625,13 +625,13 @@ namespace Bit.Core.Services
encString.Iv, encString.Mac, key); encString.Iv, encString.Mac, key);
} }
public Task<EncString> EncryptAsync(string plainValue, SymmetricCryptoKey key = null) public async Task<EncString> EncryptAsync(string plainValue, SymmetricCryptoKey key = null)
{ {
if (plainValue == null) if (plainValue == null)
{ {
return null; return null;
} }
return EncryptAsync(Encoding.UTF8.GetBytes(plainValue), key); return await EncryptAsync(Encoding.UTF8.GetBytes(plainValue), key);
} }
public async Task<EncString> EncryptAsync(byte[] plainValue, SymmetricCryptoKey key = null) public async Task<EncString> EncryptAsync(byte[] plainValue, SymmetricCryptoKey key = null)