rename to AndroidKeyStoreStorageService

This commit is contained in:
Kyle Spearrin 2017-06-10 10:52:13 -04:00
parent 82d93d2602
commit 6a88524f8e
3 changed files with 4 additions and 4 deletions

View file

@ -314,7 +314,7 @@
<Compile Include="Controls\ExtendedPickerRenderer.cs" /> <Compile Include="Controls\ExtendedPickerRenderer.cs" />
<Compile Include="Controls\ExtendedEntryRenderer.cs" /> <Compile Include="Controls\ExtendedEntryRenderer.cs" />
<Compile Include="Services\HttpService.cs" /> <Compile Include="Services\HttpService.cs" />
<Compile Include="Services\KeyStoreBackedStorageService.cs" /> <Compile Include="Services\AndroidKeyStoreStorageService.cs" />
<Compile Include="Services\LocalizeService.cs" /> <Compile Include="Services\LocalizeService.cs" />
<Compile Include="MainApplication.cs" /> <Compile Include="MainApplication.cs" />
<Compile Include="Resources\Resource.Designer.cs" /> <Compile Include="Resources\Resource.Designer.cs" />

View file

@ -211,7 +211,7 @@ namespace Bit.Android
ISecureStorageService secureStorage; ISecureStorageService secureStorage;
try try
{ {
secureStorage = new KeyStoreBackedStorageService(CrossSettings.Current); secureStorage = new AndroidKeyStoreStorageService(CrossSettings.Current);
} }
catch catch
{ {

View file

@ -15,7 +15,7 @@ using Javax.Crypto.Spec;
namespace Bit.Android.Services namespace Bit.Android.Services
{ {
public class KeyStoreBackedStorageService : ISecureStorageService public class AndroidKeyStoreStorageService : ISecureStorageService
{ {
private const string AndroidKeyStore = "AndroidKeyStore"; private const string AndroidKeyStore = "AndroidKeyStore";
private const string KeyAlias = "bitwardenKey"; private const string KeyAlias = "bitwardenKey";
@ -28,7 +28,7 @@ namespace Bit.Android.Services
private readonly KeyStore _keyStore; private readonly KeyStore _keyStore;
private readonly ISecureStorageService _oldKeyStorageService; private readonly ISecureStorageService _oldKeyStorageService;
public KeyStoreBackedStorageService(ISettings settings) public AndroidKeyStoreStorageService(ISettings settings)
{ {
_oldAndroid = Build.VERSION.SdkInt < BuildVersionCodes.M; _oldAndroid = Build.VERSION.SdkInt < BuildVersionCodes.M;
_rsaMode = _oldAndroid ? "RSA/ECB/PKCS1Padding" : "RSA/ECB/OAEPWithSHA-1AndMGF1Padding"; _rsaMode = _oldAndroid ? "RSA/ECB/PKCS1Padding" : "RSA/ECB/OAEPWithSHA-1AndMGF1Padding";