XU XUv0.16.0

#crypto/rand

导入方式: #crypto/rand

公开 API: 1 函数, 0 方法, 0 类型, 0 常量, 0 方法集

读密码学随机字节。hosted Unix 走 /dev/urandom;其它目标后置。

read

XuAPI
pub fn read(n int) string

用途

读出最多 max 字节。失败时抛出错误,调用方需处理或继续传播。

参数

n int
数量、长度或上限(int)

返回值

string — 结果字符串