mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
crypto.rand module
This commit is contained in:

committed by
Alexander Medvednikov

parent
17e8c1d628
commit
1202631fa6
13
vlib/crypto/rand/rand_test.v
Normal file
13
vlib/crypto/rand/rand_test.v
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
|
||||
// Use of this source code is governed by an MIT license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
import crypto.rand
|
||||
|
||||
fn test_crypto_rand() {
|
||||
r := rand.read(100) or {
|
||||
assert false
|
||||
return
|
||||
}
|
||||
assert r.len == 100
|
||||
}
|
Reference in New Issue
Block a user