mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
OAEPParameterSpec and provider specified
This commit is contained in:
parent
007125a071
commit
1503124108
1 changed files with 3 additions and 14 deletions
|
@ -12,6 +12,7 @@ using Android.App;
|
||||||
using Plugin.Settings.Abstractions;
|
using Plugin.Settings.Abstractions;
|
||||||
using Java.Util;
|
using Java.Util;
|
||||||
using Android.Content;
|
using Android.Content;
|
||||||
|
using Javax.Crypto.Spec;
|
||||||
|
|
||||||
namespace Bit.Android.Services
|
namespace Bit.Android.Services
|
||||||
{
|
{
|
||||||
|
@ -215,9 +216,9 @@ namespace Bit.Android.Services
|
||||||
private byte[] RsaDecrypt(byte[] encData)
|
private byte[] RsaDecrypt(byte[] encData)
|
||||||
{
|
{
|
||||||
using(var entry = GetRsaKeyEntry())
|
using(var entry = GetRsaKeyEntry())
|
||||||
using(var cipher = Cipher.GetInstance(_rsaMode))
|
using(var cipher = Cipher.GetInstance(_rsaMode, "AndroidKeyStoreBCWorkaround"))
|
||||||
{
|
{
|
||||||
cipher.Init(CipherMode.DecryptMode, entry.PrivateKey);
|
cipher.Init(CipherMode.DecryptMode, entry.PrivateKey, OAEPParameterSpec.Default);
|
||||||
var plainText = cipher.DoFinal(encData);
|
var plainText = cipher.DoFinal(encData);
|
||||||
return plainText;
|
return plainText;
|
||||||
}
|
}
|
||||||
|
@ -246,18 +247,6 @@ namespace Bit.Android.Services
|
||||||
|
|
||||||
private void SendEmail(string text)
|
private void SendEmail(string text)
|
||||||
{
|
{
|
||||||
text += "\n\n";
|
|
||||||
var providers = Security.GetProviders();
|
|
||||||
foreach(var provider in providers)
|
|
||||||
{
|
|
||||||
text += ("provider: " + provider.Name + "\n");
|
|
||||||
var services = provider.Services;
|
|
||||||
foreach(var service in provider.Services)
|
|
||||||
{
|
|
||||||
text += ("- algorithm: " + service.Algorithm + "\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var emailIntent = new Intent(Intent.ActionSend);
|
var emailIntent = new Intent(Intent.ActionSend);
|
||||||
|
|
||||||
emailIntent.SetType("plain/text");
|
emailIntent.SetType("plain/text");
|
||||||
|
|
Loading…
Reference in a new issue