Пример #1
0
func Random(n int) []byte {
	buf := make([]byte, n)

	C.randombytes(array(buf), C.ulonglong(n))

	return buf
}
Пример #2
0
func RandomBytes(buf []byte) {
	C.randombytes((*C.uchar)(&buf[0]), C.ulonglong(len(buf)))
}