automated password encryption with callbacks