1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-09 03:53:15 +00:00

initial commit

This commit is contained in:
Kyle Spearrin
2016-05-02 02:52:09 -04:00
commit bc3d9c4465
95 changed files with 9245 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
using System;
namespace Bit.App.Abstractions
{
public interface IDataObject<T> where T : IEquatable<T>
{
T Id { get; }
}
}

View File

@@ -0,0 +1,13 @@
using System.Net.Http;
using System.Threading.Tasks;
using Bit.App.Models.Api;
namespace Bit.App.Abstractions
{
public interface IApiService
{
HttpClient Client { get; set; }
Task<ApiResult<T>> HandleErrorAsync<T>(HttpResponseMessage response);
}
}

View File

@@ -0,0 +1,13 @@
using System.Threading.Tasks;
using Bit.App.Models.Api;
namespace Bit.App.Abstractions
{
public interface IAuthService
{
bool IsAuthenticated { get; }
string Token { get; set; }
Task<ApiResult<TokenResponse>> TokenPostAsync(TokenRequest request);
}
}

View File

@@ -0,0 +1,17 @@
using Bit.App.Models;
namespace Bit.App.Abstractions
{
public interface ICryptoService
{
string Base64Key { get; }
byte[] Key { get; set; }
string Decrypt(CipherString encyptedValue);
CipherString Encrypt(string plaintextValue);
byte[] MakeKeyFromPassword(string password, string salt);
string MakeKeyFromPasswordBase64(string password, string salt);
byte[] HashPassword(byte[] key, string password);
string HashPasswordBase64(byte[] key, string password);
}
}

View File

@@ -0,0 +1,7 @@
namespace Bit.App.Abstractions
{
public interface IDatabaseService
{
void CreateTables();
}
}

View File

@@ -0,0 +1,12 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Bit.App.Models;
namespace Bit.App.Abstractions
{
public interface IFolderService
{
Task<IEnumerable<Folder>> GetAllAsync();
Task SaveAsync(Folder folder);
}
}

View File

@@ -0,0 +1,10 @@
namespace Bit.App.Abstractions
{
public interface ISecureStorageService
{
void Store(string key, byte[] dataBytes);
byte[] Retrieve(string key);
void Delete(string key);
bool Contains(string key);
}
}

View File

@@ -0,0 +1,12 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Bit.App.Models;
namespace Bit.App.Abstractions
{
public interface ISiteService
{
Task<IEnumerable<Site>> GetAllAsync();
Task SaveAsync(Site site);
}
}

View File

@@ -0,0 +1,9 @@
using SQLite;
namespace Bit.App.Abstractions
{
public interface ISqlService
{
SQLiteConnection GetConnection();
}
}