mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-09-23 19:31:13 -04:00
Merge 70f0936e45e30bc2288a783e7e43ba5640ef98a7 into b90017bfe6f96252e9db96bb972d27f2c7246a66
This commit is contained in:
commit
a79ba49ed4
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"crypto/sha1"
|
||||
"fmt"
|
||||
"net"
|
||||
"regexp"
|
||||
@ -421,7 +421,7 @@ func (s *Server) Stop() {
|
||||
|
||||
// Fingerprint returns the fingerprint based on a public key
|
||||
func Fingerprint(k ssh.PublicKey) string {
|
||||
hash := md5.Sum(k.Marshal())
|
||||
hash := sha1.Sum(k.Marshal())
|
||||
r := fmt.Sprintf("% x", hash)
|
||||
return strings.Replace(r, " ", ":", -1)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user