added rsafun.cpp to the build system and updated unittests