EncryptionContext: fix exception message

This commit is contained in:
Dylan K. Taylor 2020-06-18 11:52:05 +01:00
parent d931a5bcc0
commit 222399d178

View File

@ -89,7 +89,7 @@ class EncryptionContext{
private function calculateChecksum(int $counter, string $payload) : string{ private function calculateChecksum(int $counter, string $payload) : string{
$hash = openssl_digest(Binary::writeLLong($counter) . $payload . $this->key, self::CHECKSUM_ALGO, true); $hash = openssl_digest(Binary::writeLLong($counter) . $payload . $this->key, self::CHECKSUM_ALGO, true);
if($hash === false){ if($hash === false){
throw new \RuntimeException("Encryption error: " . openssl_error_string()); throw new \RuntimeException("openssl_digest() error: " . openssl_error_string());
} }
return substr($hash, 0, 8); return substr($hash, 0, 8);
} }