FingerPrint method will return byte array in a length of
16-20 bytes, that hold (almost) unique fingerprint for the
requested key.
Fingerprints are used when there is a need to determine
if some keys match. Since keys can be pretty large,
checking if some keys match is pretty hard to do. Therefore
when client wants to be sure of server's identity, it
can connect to the server, check server's fingerprint
information, and check if it matches with locally stored
value. If client is connecting for the first time then
there's no way of checking for stored values, so the
client must decide whether he will trust received key or
not. Client can ask server's maintainer (through some
private channel, like telephone for example) to send
fingerprint information about some key and then on each
connection test if it matches received key. 20 byte
fingerprint is much easier to test than few hundreds bytes
that are actually contained in each key. Digest algorithms
MD5 or SHA1
are used to calculate 16/20 byte fingerprint which is
different for each key.
You can use this method to read fingerprint information
for some key, and you can, for example, publicly announce
it on your webpage or similar place , so users that connect
can be sure that they are connecting to proper server and
no one is tampering on your connection.
Instead of byte array expression, you can read
fingerprint data also as a String, using FingerPrint
method.