mirror of
https://github.com/bitwarden/server.git
synced 2025-02-22 02:51:33 +01:00
add support for OAEP SHA1
This commit is contained in:
parent
abf8ab2c73
commit
62e35f0a1a
@ -5,6 +5,7 @@
|
||||
AesCbc256_B64 = 0,
|
||||
AesCbc128_HmacSha256_B64 = 1,
|
||||
AesCbc256_HmacSha256_B64 = 2,
|
||||
RsaOaep_Sha256_B64 = 3
|
||||
Rsa2048_OaepSha256_B64 = 3,
|
||||
Rsa2048_OaepSha1_B64 = 4
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,8 @@ namespace Bit.Core.Utilities
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Enums.EncryptionType.RsaOaep_Sha256_B64:
|
||||
case Enums.EncryptionType.Rsa2048_OaepSha256_B64:
|
||||
case Enums.EncryptionType.Rsa2048_OaepSha1_B64:
|
||||
if(encStringPieces.Length != 1)
|
||||
{
|
||||
return false;
|
||||
@ -77,7 +78,8 @@ namespace Bit.Core.Utilities
|
||||
return false;
|
||||
}
|
||||
|
||||
if(encType != Enums.EncryptionType.RsaOaep_Sha256_B64)
|
||||
if(encType != Enums.EncryptionType.Rsa2048_OaepSha1_B64 &&
|
||||
encType != Enums.EncryptionType.Rsa2048_OaepSha256_B64)
|
||||
{
|
||||
var iv = Convert.FromBase64String(encStringPieces[0]);
|
||||
var ct = Convert.FromBase64String(encStringPieces[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user