I'm trying to refactor some old code which uses the ssh2_sftp functions to the phpseclib library.
I couldn't, however, find an equivalent for the ssh2_fingerprint function, or rather it's hashing algorithm. You can get the host key from the server but I kinda don't get the hashing right.
Can somebody provide something helpful here?
Original
ssh2_fingerprint($connection, SSH2_FINGERPRINT_SHA1 | SSH2_FINGERPRINT_HEX);
New code (probably)
hash('HOW?', $Net_SFTP->getServerPublicHostKey());
Or is this wrong after all?