c/openssl: rand
This commit is contained in:
17
c/openssl/_demo/cranddemo/rand.go
Normal file
17
c/openssl/_demo/cranddemo/rand.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goplus/llgo/c/openssl"
|
||||
)
|
||||
|
||||
func main() {
|
||||
b := make([]byte, 10)
|
||||
|
||||
openssl.RANDBytes(b)
|
||||
fmt.Printf("%x\n", b)
|
||||
|
||||
openssl.RANDPrivBytes(b)
|
||||
fmt.Printf("%x\n", b)
|
||||
}
|
||||
Reference in New Issue
Block a user