github.com/traefik/yaegi@v0.15.1/_test/issue-1328.go (about)

     1  package main
     2  
     3  import (
     4  	"crypto/sha1"
     5  	"encoding/hex"
     6  )
     7  
     8  func main() {
     9  	script := "hello"
    10  	sumRaw := sha1.Sum([]byte(script))
    11  	sum := hex.EncodeToString(sumRaw[:])
    12  	println(sum)
    13  }
    14  
    15  // Output:
    16  // aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d