On 14/06/2022 11:20 pm, Ryan Nowakowski wrote:
Summing the ordinal of the characters won't catch transposition: >>> chars = 'ab' >>> sum([ord(c) for c in chars]) 195 >>> chars = 'ba' >>> sum([ord(c) for c in chars]) 195Better to use a real hash algorithm if you're trying to detect changes. My note above about hashing not being required is because you don't need to detect changes because you explicitly already know when changes are being made.
Thanks Ryan.It is all working now. I append " - No longer relevant" to the note title if any change is detected. Otherwise the note gets deleted.
Cheers Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Just ask and I'll send it to you. Your email software can handle signing. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/75458bb4-bb4b-0e44-54c1-59768d34d403%40dewhirst.com.au.
OpenPGP_signature
Description: OpenPGP digital signature