1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-02 08:33:17 +00:00

download, decrypt and open attachment files

This commit is contained in:
Kyle Spearrin
2017-07-12 23:09:44 -04:00
parent 0a7ad44d23
commit ac3fdbc2cd
26 changed files with 285 additions and 71 deletions

View File

@@ -1,7 +0,0 @@
namespace Bit.App.Abstractions
{
public interface IClipboardService
{
void CopyToClipboard(string text);
}
}

View File

@@ -19,6 +19,7 @@ namespace Bit.App.Abstractions
void ClearKeys();
string Decrypt(CipherString encyptedValue, SymmetricCryptoKey key = null);
byte[] DecryptToBytes(CipherString encyptedValue, SymmetricCryptoKey key = null);
byte[] DecryptToBytes(byte[] encyptedValue, SymmetricCryptoKey key = null);
byte[] RsaDecryptToBytes(CipherString encyptedValue, byte[] privateKey);
CipherString Encrypt(string plaintextValue, SymmetricCryptoKey key = null);
SymmetricCryptoKey MakeKeyFromPassword(string password, string salt);

View File

@@ -0,0 +1,8 @@
namespace Bit.App.Abstractions
{
public interface IDeviceActionService
{
void CopyToClipboard(string text);
bool OpenFile(byte[] fileData, string id, string fileName);
}
}

View File

@@ -14,5 +14,6 @@ namespace Bit.App.Abstractions
Task<Tuple<IEnumerable<Login>, IEnumerable<Login>>> GetAllAsync(string uriString);
Task<ApiResult<LoginResponse>> SaveAsync(Login login);
Task<ApiResult> DeleteAsync(string id);
Task<byte[]> DownloadAndDecryptAttachmentAsync(SymmetricCryptoKey key, string url);
}
}