mirror of https://github.com/WebAssembly/wasi-sdk
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
240 B
18 lines
240 B
1 year ago
|
#include <assert.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
int main() {
|
||
|
char buf[256] = {0};
|
||
|
int ret = getentropy(buf, 256);
|
||
|
assert(ret == 0);
|
||
|
|
||
|
int sum = 0;
|
||
|
for (int i = 0; i < 256; i++) {
|
||
|
sum += buf[i];
|
||
|
}
|
||
|
|
||
|
assert(sum != 0);
|
||
|
|
||
|
return 0;
|
||
|
}
|