SafeHash library + Main for testing