Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

digest is a small value generated by a hash function from a whole message. Ideally, a digest is quick to calculate, irreversible, and unpredictable, and therefore indicates whether someone has tampered with a given message.

A digest can be used to perform several tasks:

  • in non-cryptographic applications (e.g., the index of hash tables, or a fingerprint used to detect duplicate data or to uniquely identify files)
  • verify message integrity (a tampered message will have a different hash)
  • store passwords so that they can be retrieved, but still checked (To do this securely, you also need to salt the password.)
  • generate pseudo-random numbers
  • generate keys

It is critical to choose the proper hash function for your use case to avoid collisions and predictability.

Learn more

文档标签和贡献者

 此页面的贡献者: Sodan, marumari, Andrew_Pfeiffer, hbloomer, kscarfone, teoli
 最后编辑者: Sodan,