This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年01月04日 04:58 by Ramchandra Apte, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg150587 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2012年01月04日 04:58 | |
If you run hash on strings containing only null characters it returns the length of the string
>>> hash("0円")
1
>>> hash("0円0円")
2
>>> hash("0円"*1000)
1000
This behaviour is not like proper hash functions.
The hashes of these strings should exhibit the avalanche effect like in a proper hash function.
|
|||
| msg150588 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2012年01月04日 05:05 | |
No. Python's dictionary implementation is designed to handle hash functions with the properties of Python's. |
|||
| msg150590 - (view) | Author: Jesús Cea Avión (jcea) * (Python committer) | Date: 2012年01月04日 05:14 | |
Object hashes are not crypto hashes. Use hashlib module for crypto. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:25 | admin | set | github: 57919 |
| 2012年01月04日 05:14:51 | jcea | set | nosy:
+ jcea messages: + msg150590 |
| 2012年01月04日 05:05:24 | benjamin.peterson | set | status: open -> closed nosy: + benjamin.peterson messages: + msg150588 resolution: rejected |
| 2012年01月04日 05:02:10 | Ramchandra Apte | set | title: hash() on string containing only null characters returns the length of the strings -> hash() on strings containing only null characters returns the length of the strings |
| 2012年01月04日 05:01:49 | Ramchandra Apte | set | title: hash() on string containing only null characters returns the length of the string -> hash() on string containing only null characters returns the length of the strings |
| 2012年01月04日 04:58:50 | Ramchandra Apte | create | |