Skip to content

Commit 67a0272

Browse files
authored
Adding cases for 192&128GCM decryption
1 parent db4c6f9 commit 67a0272

File tree

1 file changed

+8
-0
lines changed
  • Mastercard.Developer.ClientEncryption.Core/Encryption/JWE

1 file changed

+8
-0
lines changed

Mastercard.Developer.ClientEncryption.Core/Encryption/JWE/JweObject.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ internal class JweObject
1111
{
1212
private const string A128CBC_HS256 = "A128CBC-HS256";
1313
private const string A256GCM = "A256GCM";
14+
private const string A128GCM = "A128GCM";
15+
private const string A192GCM = "A192GCM";
1416

1517
public JweHeader Header { get; private set; }
1618
public string RawHeader { get; private set; }
@@ -35,6 +37,12 @@ public string Decrypt(JweConfig config)
3537
case A256GCM:
3638
plaintext = AesGcm.Decrypt(unwrappedKey, this);
3739
break;
40+
case A128GCM:
41+
plaintext = AesGcm.Decrypt(unwrappedKey, this);
42+
break;
43+
case A192GCM:
44+
plaintext = AesGcm.Decrypt(unwrappedKey, this);
45+
break;
3846
case A128CBC_HS256:
3947
plaintext = AesCbc.Decrypt(unwrappedKey, this);
4048
break;

0 commit comments

Comments
 (0)