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

use aes key in keystore on "new" android. migrate.

This commit is contained in:
Kyle Spearrin
2017-06-10 22:18:34 -04:00
parent 6a88524f8e
commit 6aaa083157
2 changed files with 108 additions and 50 deletions

View File

@@ -207,23 +207,10 @@ namespace Bit.Android
container.RegisterSingleton(application.ApplicationContext);
container.RegisterSingleton<Application>(application);
// Secure Storage
ISecureStorageService secureStorage;
try
{
secureStorage = new AndroidKeyStoreStorageService(CrossSettings.Current);
}
catch
{
// Some isolated devices are having a hard time generating RSA keys for the key store.
// Continue using the "old" keystore implementation for now.
secureStorage = new KeyStoreStorageService(new char[] { });
}
// Services
container.RegisterSingleton<IDatabaseService, DatabaseService>();
container.RegisterSingleton<ISqlService, SqlService>();
container.RegisterSingleton(secureStorage);
container.RegisterSingleton<ISecureStorageService, AndroidKeyStoreStorageService>();
container.RegisterSingleton<ICryptoService, CryptoService>();
container.RegisterSingleton<IKeyDerivationService, BouncyCastleKeyDerivationService>();
container.RegisterSingleton<IAuthService, AuthService>();