Rizin
unix-like reverse engineering framework and cli tools
nonrandomopentest.c File Reference
#include "zipint.h"
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

int main (int argc, const char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Definition at line 40 of file nonrandomopentest.c.

40  {
41  zip_uint8_t buf[1024];
42  int i;
43 
44 #ifdef HAVE_CRYPTO
45  if (!zip_secure_random(buf, sizeof(buf))) {
46  fprintf(stderr, "zip_secure_random returned false\n");
47  exit(1);
48  }
49  for (i = 0; i < sizeof(buf); i++) {
50  if (buf[i] != 0) {
51  fprintf(stderr, "non-zero byte found\n");
52  exit(1);
53  }
54  }
55 #endif
56  exit(0);
57 }
lzma_index ** i
Definition: index.h:629
voidpf void * buf
Definition: ioapi.h:138
ZIP_EXTERN bool zip_secure_random(zip_uint8_t *buffer, zip_uint16_t length)
uint8_t zip_uint8_t
Definition: zipconf.h:33

References test-lz4-list::exit, i, and zip_secure_random().