Best algorithm for hashing number values?

前端 未结 8 1342
后悔当初
后悔当初 2021-02-01 10:24

When dealing with a series of numbers, and wanting to use hash results for security reasons, what would be the best way to generate a hash value from a given series of digits?

8条回答
  •  余生分开走
    2021-02-01 10:50

    By definition, a cryptographic hash will work perfectly for your use case. Even if the characters are close, the hash should be nicely distributed.

    So I advise you to use any cryptographic hash (SHA-256 for example), with a salt.

提交回复
热议问题