From 5777706a583fea67cf58bae1464c7acc32fd40e2 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 16 Mar 2021 11:23:50 +0200 Subject: [PATCH] crypto.rand: add a shim for `fn read(bytes_needed int) ?[]byte` in rand_default.c.v, so that it shows with `v doc` --- vlib/crypto/rand/rand_default.c.v | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vlib/crypto/rand/rand_default.c.v diff --git a/vlib/crypto/rand/rand_default.c.v b/vlib/crypto/rand/rand_default.c.v new file mode 100644 index 0000000000..366757971c --- /dev/null +++ b/vlib/crypto/rand/rand_default.c.v @@ -0,0 +1,9 @@ +// Copyright (c) 2019-2021 Alexander Medvednikov. All rights reserved. +// Use of this source code is governed by an MIT license +// that can be found in the LICENSE file. +module rand + +// read returns an array of `bytes_needed` random bytes read from the OS. +pub fn read(bytes_needed int) ?[]byte { + return error('crypto.read is not implemented on this platform') +}