Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
add c code cb8d457 Jul 9, 2019
1 contributor

Users who have contributed to this file

19 lines (14 sloc) 390 Bytes
/*
The code has been derived from systemd:
https://github.com/systemd/systemd/blob/master/src/basic/random-util.c
SPDX-License-Identifier: LGPL-2.1+
*/
#include <stdio.h>
int main() {
unsigned char success;
unsigned long v;
asm volatile("rdrand %0;"
"setc %1"
: "=r"(v), "=qm"(success));
printf("success: %i value: %lx\n", success, v);
}
You can’t perform that action at this time.