Java recreate string from hashcode

前端 未结 5 1659
眼角桃花
眼角桃花 2020-12-10 15:45

Is there any way that I can use a hashcode of a string in java, and recreate that string?

e.g. something like this:

String myNewstring = StringUtils.         


        
5条回答
  •  再見小時候
    2020-12-10 16:22

    For example, "1019744689" and "123926772" both have a hashcode of -1727003481. This proves that for any integer, you might get a different result (i.e. reversehashcode(hashcode(string)) != string).

提交回复
热议问题