mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 05:13:31 +00:00
oaep spec only for "new android"
This commit is contained in:
@@ -207,8 +207,16 @@ namespace Bit.Android.Services
|
||||
{
|
||||
using(var entry = GetRsaKeyEntry())
|
||||
using(var cipher = Cipher.GetInstance(_rsaMode))
|
||||
{
|
||||
if(_oldAndroid)
|
||||
{
|
||||
cipher.Init(CipherMode.DecryptMode, entry.PrivateKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
cipher.Init(CipherMode.DecryptMode, entry.PrivateKey, OAEPParameterSpec.Default);
|
||||
}
|
||||
|
||||
var plainText = cipher.DoFinal(encData);
|
||||
return plainText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user