mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-06-07 19:03:17 +03:00
parent
55c1def24d
commit
7781d5b135
@ -68,5 +68,5 @@ func MakeNoAuth() *ssh.ServerConfig {
|
|||||||
// See: https://anongit.mindrot.org/openssh.git/commit/?id=56d1c83cdd1ac
|
// See: https://anongit.mindrot.org/openssh.git/commit/?id=56d1c83cdd1ac
|
||||||
func Fingerprint(k ssh.PublicKey) string {
|
func Fingerprint(k ssh.PublicKey) string {
|
||||||
hash := sha256.Sum256(k.Marshal())
|
hash := sha256.Sum256(k.Marshal())
|
||||||
return base64.StdEncoding.EncodeToString(hash[:])
|
return "SHA256:" + base64.StdEncoding.EncodeToString(hash[:])
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user