Computing a signature seems to work now :)
cleaned up the code
added the functions to gererate a signature in the header file