mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
17 lines
236 B
Go
17 lines
236 B
Go
package main
|
|
|
|
import (
|
|
"crypto/sha1"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func main() {
|
|
script := "hello"
|
|
sumRaw := sha1.Sum([]byte(script))
|
|
sum := hex.EncodeToString(sumRaw[:])
|
|
println(sum)
|
|
}
|
|
|
|
// Output:
|
|
// aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
|