Fingerprint
Fingerprint Trait for Private Keys
Tags
Table of Contents
Methods
- getFingerprint() : mixed
- Returns the public key's fingerprint
Methods
getFingerprint()
Returns the public key's fingerprint
public
getFingerprint([string $algorithm = 'md5' ]) : mixed
The public key's fingerprint is returned, which is equivalent to running ssh-keygen -lf rsa.pub
. If there is
no public key currently loaded, false is returned.
Example output (md5): "c1:b1:30:29:d7:b8:de:6c:97:77:10:d7:46:41:63:87" (as specified by RFC 4716)
Parameters
- $algorithm : string = 'md5'
-
The hashing algorithm to be used. Valid options are 'md5' and 'sha256'. False is returned for invalid values.