Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit 5117b85

Browse files
authored
Adding cases for A128/192GCM Decryption
1 parent 0dc447e commit 5117b85

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Developer/Encryption/JWE/JweObject.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@ public function decrypt($config)
8181
$this->getRawHeader(),
8282
EncodingUtils::base64UrlDecode($this->getCipherText())
8383
);
84+
case "A128GCM":
85+
return AESGCM::decrypt(
86+
EncodingUtils::base64UrlDecode($this->getIv()),
87+
$cek,
88+
EncodingUtils::base64UrlDecode($this->getAuthTag()),
89+
$this->getRawHeader(),
90+
EncodingUtils::base64UrlDecode($this->getCipherText())
91+
);
92+
case "A192GCM":
93+
return AESGCM::decrypt(
94+
EncodingUtils::base64UrlDecode($this->getIv()),
95+
$cek,
96+
EncodingUtils::base64UrlDecode($this->getAuthTag()),
97+
$this->getRawHeader(),
98+
EncodingUtils::base64UrlDecode($this->getCipherText())
99+
);
84100
case "A128CBC-HS256":
85101
return AESCBC::decrypt(
86102
EncodingUtils::base64UrlDecode($this->getIv()),

0 commit comments

Comments
 (0)