Supported Versions: PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL hash >= 1.1
Generate a hash value (message digest)
<?php hash(    string $algo,    string $data,    bool $binary = false,    array $options = []): string
<?php         $content = explode(' ', $publicKey, 3);

        $algo = $content[0] === 'ssh-rsa' ? 'md5' : 'sha512';



        return implode(':', str_split(hash($algo, base64_decode($content[1])), 2));

    }



    private function authenticate(SFTP $connection): void
<?php         $content = explode(' ', $publicKey, 3);

        $algo = $content[0] === 'ssh-rsa' ? 'md5' : 'sha512';



        return implode(':', str_split(hash($algo, base64_decode($content[1])), 2));

    }

}