mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 17:23:18 +00:00
Use CipherByteArray to signify encrypted byte[] (#1366)
* Use CipherByteArray to signify encrypted byte[] * Rename CipherString and CipherByteArray to EncString and EncByteArray
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Models.Domain;
|
||||
|
||||
namespace Bit.Core.Services
|
||||
{
|
||||
@@ -13,11 +14,11 @@ namespace Bit.Core.Services
|
||||
|
||||
private readonly ApiService _apiService;
|
||||
|
||||
public async Task Upload(string encryptedFileName, byte[] encryptedFileData, Func<MultipartFormDataContent, Task> apiCall)
|
||||
public async Task Upload(string encryptedFileName, EncByteArray encryptedFileData, Func<MultipartFormDataContent, Task> apiCall)
|
||||
{
|
||||
var fd = new MultipartFormDataContent($"--BWMobileFormBoundary{DateTime.UtcNow.Ticks}")
|
||||
{
|
||||
{ new ByteArrayContent(encryptedFileData), "data", encryptedFileName }
|
||||
{ new ByteArrayContent(encryptedFileData.Buffer), "data", encryptedFileName }
|
||||
};
|
||||
|
||||
await apiCall(fd);
|
||||
|
||||
Reference in New Issue
Block a user