AMulet 2.0
AIG Multiplier Verification Tool
hash_val.cpp File Reference

contains functions used to compute hash values for variables More...

#include "hash_val.h"
Include dependency graph for hash_val.cpp:

Functions

uint16_t rand16 ()
 
uint64_t rand64 ()
 
void init_nonces ()
 
uint64_t get_nonces_entry (size_t index)
 
uint64_t hash_string (const std::string &str)
 

Variables

uint64_t nonces [32]
 array used to hold 64-bit random numbers More...
 
const size_t num_nonces = sizeof nonces / sizeof nonces[0]
 number of random numbers More...
 

Detailed Description

contains functions used to compute hash values for variables

Part of AMulet2 : AIG Multiplier Verification Tool. Copyright (C) 2020 Daniela Kaufmann, Johannes Kepler University Linz

Function Documentation

uint64_t get_nonces_entry ( size_t  index)

Returns the 64-bit random number in our array of random numbers

Parameters
indexsize_t
Returns
returns the random number stored in nonces[index]
uint64_t hash_string ( const std::string &  str)

Computes the hash value for the given string

Parameters
stra const std::string
Returns
a uint64_t computed hash value for the input string
void init_nonces ( )

Fills a 32-bit array with 64-bit random numbers

uint16_t rand16 ( )

Generates a 16 bit random number

Returns
a 16-bit random number
uint64_t rand64 ( )

Generates a 64 bit random number

Returns
a 64-bit random number, based on rand16()

Variable Documentation

uint64_t nonces[32]

array used to hold 64-bit random numbers

const size_t num_nonces = sizeof nonces / sizeof nonces[0]

number of random numbers