Fix string handling to avoid problems in Android

Use a temporay std::string variable to hold an intermediate result, use this
to get the real C char string. As an additional safty feature use a counted
string comapre.
Fix building of small demo test application
Add some checks and make code more defensive
Provide some more crypto info even if not yet secure
Remove verbose logging