diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index ef6c6e3f..13f08047 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -57,7 +57,7 @@ class Random try { return random_bytes($length); } - catch (\EngineException $e) { + catch (\Error $e) { // If a sufficient source of randomness is unavailable, random_bytes() will emit a warning. // We don't actually need to do anything here. The string() method should just continue // as normal. Note, however, that if we don't have a sufficient source of randomness for