protected function getRandomBytesFromOpenSSL($numberOfBytes)
    {
        $randomBytes = openssl_random_pseudo_bytes($numberOfBytes, $cryptographicStrong);

        $this->setCryptographicStrong($cryptographicStrong);

        if (false === $randomBytes || '' === $randomBytes || false === $cryptographicStrong) {
            throw new CryptographicWeaknessException(
                'Error fetching random bytes from OpenSSL.'
            );
        }

        return $randomBytes;
    }