1// Copyright (c) 2019-2020 Alexander Medvednikov. All rights reserved.
2// Use of this source code is governed by an MIT license
3// that can be found in the LICENSE file.
4
5module rand
6
7const (
8	read_error = error('crypto.rand.read() error reading random bytes')
9)
10
11// NOTE: temp until we have []bytes(buff)
12fn c_array_to_bytes_tmp(len int, buffer voidptr) []byte {
13
14	mut arr := []byte{len:len, cap:1}
15	arr.data = buffer
16	/*
17
18	arr = array {
19		len: len
20		cap: 1
21		element_size: 1
22		data: buffer
23	}
24	*/
25	return arr
26}
27