mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-09-23 19:31:13 -04:00
Use sha1 for fingerprint instead of md5
This commit is contained in:
parent
857dcd0a14
commit
70f0936e45
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"crypto/sha1"
|
||||
"fmt"
|
||||
"net"
|
||||
"regexp"
|
||||
@ -282,7 +282,7 @@ func (s *Server) Stop() {
|
||||
}
|
||||
|
||||
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