c++: apply minor refactoring to simple_rsa_lib