Files
llgo/_demo/cmd5demo/md5.go

19 lines
343 B
Go
Raw Normal View History

2024-07-30 01:35:49 +08:00
package main
import (
"fmt"
"unsafe"
"github.com/goplus/llgo/c/openssl"
)
func main() {
var md5 openssl.MD5_CTX
var h = make([]byte, openssl.MD5_LBLOCK)
md5.Init()
md5.UpdateString("The fog is getting thicker!")
md5.UpdateString("And Leon's getting laaarger!")
md5.Final(unsafe.Pointer(unsafe.SliceData(h)))
fmt.Printf("%x", h)
}