String to unique integer hashing

前端 未结 7 1370
日久生厌
日久生厌 2020-12-18 18:49

I\'m trying to develop a system that can change my string into a unique integral value, meaning say for example the word \"account\" has an encrypted numerical value of 0891

相关标签:
7条回答
  • 2020-12-18 19:15

    If you don't have any limit on the number of bytes that these integers can occupy, then the underlying (e.g. Ascii) byte codes for each character will give you an integer representation. Equivalently, assign 0=A, 1=B up to Z=25 and then the word itself is the integer in base 26.

    0 讨论(0)
提交回复
热议问题