c# - How to get original string from the int generated by gethashcode -
i have generate hash code as
string textboxval="naresh"; int code =textboxval.gethashcode(); textbox2.text=code.tostring();
it has generated integer value -1078339947;
now want original name naresh this(-1078339947) hashcode. how can this.
for practical purposes, can't: there lot less hash codes there strings, there more 1 original value give same hash code.
hashing is, in reality, one-way operation. if refers reversible hash, isn't true hash (because hash by definition reduces input set 1 of smaller number of output values). closest operation describe might encryption function - allow reverse operation - unlikely generate small number 10-digit output in question.
Comments
Post a Comment