Files
llgo/c/openssl/_demo/cmd5demo/md5.go

19 lines
327 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!")
2024-07-30 02:07:19 +08:00
md5.Final(unsafe.SliceData(h))
2024-07-30 01:35:49 +08:00
fmt.Printf("%x", h)
}