域名备案域名管理都过了,但是在添加纪录这里始终是异常,已经尝试了两天了,求指点
如果你需要安全的随机字符或整数:
例如:
#include "sodium.h"
int foo()
{
char myString[32];
uint32_t myInt;
/* myString will be an array of 32 random bytes, not null-terminated */
randombytes_buf(myString, 32);
/* myInt will be a random number between 0 and 9 */
myInt = randombytes_uniform(10);
}
randombytes_uniform() 函数是比较安全的
#include <time.h>
#include <stdlib.h>
srand(time(NULL)); // should only be called once
int r = rand(); // returns a pseudo-random integer between 0 and RAND_MAX