mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-11 10:56:17 +08:00
22 lines
298 B
C
22 lines
298 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <libgen.h>
|
|
#include <openssl/rand.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
unsigned char mk[32];
|
|
int i;
|
|
|
|
RAND_bytes(mk, sizeof(mk));
|
|
|
|
for (i = 0; i < sizeof(mk); i++) {
|
|
printf("%02x", mk[i]);
|
|
}
|
|
printf("\n");
|
|
|
|
return 0;
|
|
}
|
|
|