This commit is contained in:
the-djmaze 2022-04-19 10:33:21 +02:00
parent ef03ba4f60
commit eff357dc8e
10 changed files with 23 additions and 20 deletions

View file

@ -98,9 +98,11 @@ abstract class Crypt
$salt = \random_bytes(16);
$result = ['xxtea', $salt, static::XxteaEncrypt($data, $salt, $key)];
}
/*
if (static::{"{$result[0]}Decrypt"}($result[2], $result[1], $key) !== $data) {
throw new \Exception('Encrypt/Decrypt mismatch');
}
*/
return $result;
}