You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
318 B

10 months ago
package main
import (
"crypto/md5"
"crypto/sha256"
"fmt"
)
func main() {
s := "Hello"
sha256 := sha256.Sum256([]byte(s))
md5 := md5.Sum([]byte(s))
fmt.Println()
fmt.Println(s)
fmt.Println()
fmt.Printf("%x", sha256)
fmt.Println()
fmt.Println()
fmt.Printf("%x", md5)
fmt.Println()
fmt.Println()
}