|
@@ -174,7 +174,7 @@ |
|
|
block discarded – undo |
|
174
|
174
|
$size = \count($nonces); |
|
175
|
175
|
|
|
176
|
176
|
//try to decrypt starting from last stored nonce |
|
177
|
|
- for ($i = $size -1; $i > -1; $i--) { |
|
|
177
|
+ for ($i = $size - 1; $i > -1; $i--) { |
|
178
|
178
|
//for successful decryption return true |
|
179
|
179
|
if (($tmpPlainText = \sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($encryptedToken, '', $nonces[$i], $key))) { |
|
180
|
180
|
//plainText will remain string if sodium_crypto return false |
Please login to merge, or discard this patch.