moved key dump functions to the lib
added a sample for lib usage
api doc updated