#include "frdi.h"
Functions | |
char * | frdiTimestampNow () |
void * | frdiMemoryAllocate (int size) |
void | frdiMemoryFree (void *ptr) |
void | frdiInitialiseTiger () |
char * | frdiHashTiger (char *message) |
char * | frdiHash (char *message) |
frdi_bigint * | frdiBigintNew (frdi_app *self) |
int | frdiRandInt (frdi_app *self, int start, int finish) |
frdi_bigint * | frdiRandBigint (frdi_app *self, frdi_bigint *finish, frdi_seed *seed) |
frdi_seed * | frdiRandSeedNew (frdi_app *self, char *randomness) |
char * | frdiRandGenerate (frdi_app *self) |
char * | frdiBigintToHex (frdi_app *self, frdi_bigint *num) |
frdi_bigint * | frdiHexToBigint (frdi_app *self, char *str) |
Variables | |
_hash_descriptor | tiger |
|
returns the current time as a string YYYY-MM-DD HH:MM:SS uses the UTC timezone to ensure coordination between clients and servers in different timezones. CHANGED TO: timestamp - YYYY-MM-DDThh:mm:ssTZ http://www.w3.org/TR/html4/types.html#h-6.5 |
|
Put here to allow easy later aleration to a more efficient mechanism. There should be no direct calls to malloc() from anywhere else. |
|
Put here to allow easy later aleration to a more efficient mechanism. There should be no direct calls to free() from anywhere else. |
|
This must only ever be called once |
|
uses the Tiger message digest algorithm to create a digest of a message |
|
I havn't decided yet what to do about allowing multiple algorithms. For now this defaults to Tiger. |
|
returns a correctly initialised pointer to a frdi_bigint |
|
Returns a random integer between start and finish, inclusive |
|
Returns a random bigint between 0 and finish - 1 |
|
Returns a seed (used to keep state for random()) we use the tiger hash of randomness as the salt |
|
generate a string containing randomness the time, the process currently running, our ip address |
|
frdi_bigint * -> char* hex string |
|
char* hex string -> frdi_bigint * |
|
this should be thread safe |