mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
oaep spec only for "new android"
This commit is contained in:
parent
b157f2085f
commit
b8c7752356
1 changed files with 9 additions and 1 deletions
|
@ -207,8 +207,16 @@ namespace Bit.Android.Services
|
||||||
{
|
{
|
||||||
using(var entry = GetRsaKeyEntry())
|
using(var entry = GetRsaKeyEntry())
|
||||||
using(var cipher = Cipher.GetInstance(_rsaMode))
|
using(var cipher = Cipher.GetInstance(_rsaMode))
|
||||||
|
{
|
||||||
|
if(_oldAndroid)
|
||||||
|
{
|
||||||
|
cipher.Init(CipherMode.DecryptMode, entry.PrivateKey);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
cipher.Init(CipherMode.DecryptMode, entry.PrivateKey, OAEPParameterSpec.Default);
|
cipher.Init(CipherMode.DecryptMode, entry.PrivateKey, OAEPParameterSpec.Default);
|
||||||
|
}
|
||||||
|
|
||||||
var plainText = cipher.DoFinal(encData);
|
var plainText = cipher.DoFinal(encData);
|
||||||
return plainText;
|
return plainText;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue