OpenVAS Scanner 23.23.1
genrand.c File Reference

Unix SMB/CIFS implementation. Functions to create reasonable random numbers for crypto use. More...

#include "byteorder.h"
#include "md4.h"
#include "proto.h"
#include "smb.h"
#include <pwd.h>
#include <time.h>
#include <unistd.h>
#include <fcntl.h>

Macros

#define uint32   uint32_t
#define False   0
#define True   1
#define ZERO_STRUCT(x)

Functions

static void get_rand_reseed_data_ntlmssp (int *reseed_data)
static void do_filehash_ntlmssp (const char *fname, unsigned char *the_hash)
static int do_reseed_ntlmssp (bool use_fd, int fd)
void generate_random_buffer_ntlmssp (unsigned char *out, int len)

Variables

static unsigned char smb_arc4_state [258]
static uint32 counter
static bool done_reseed_ntlmssp = False
static void(* reseed_callback_ntlmssp )(int *newseed)

Detailed Description

Unix SMB/CIFS implementation. Functions to create reasonable random numbers for crypto use.

Random number generation.

Macro Definition Documentation

◆ False

#define False   0

◆ True

#define True   1

◆ uint32

#define uint32   uint32_t

◆ ZERO_STRUCT

#define ZERO_STRUCT ( x)
Value:
memset ((char *) &(x), 0, sizeof (x))

Function Documentation

◆ do_filehash_ntlmssp()

void do_filehash_ntlmssp ( const char * fname,
unsigned char * the_hash )
static

◆ do_reseed_ntlmssp()

int do_reseed_ntlmssp ( bool use_fd,
int fd )
static

◆ generate_random_buffer_ntlmssp()

void generate_random_buffer_ntlmssp ( unsigned char * out,
int len )

◆ get_rand_reseed_data_ntlmssp()

void get_rand_reseed_data_ntlmssp ( int * reseed_data)
static

Variable Documentation

◆ counter

uint32 counter
static

◆ done_reseed_ntlmssp

bool done_reseed_ntlmssp = False
static

◆ reseed_callback_ntlmssp

void(* reseed_callback_ntlmssp) (int *newseed) ( int * newseed)
static

◆ smb_arc4_state

unsigned char smb_arc4_state[258]
static