ashing algorithm example