c/openssl: rand

This commit is contained in:
xushiwei
2024-07-31 01:27:08 +08:00
parent ee3d11cb53
commit a3ff845a14
6 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
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.SliceData(h))
fmt.Printf("%x", h)
}