I'm generating MD5 digests with Python like so:
import hashlib
m = hashlib.m5()
md5 = m.update('some_string')
return md5.digest()
Now, looking at a similar SO question, I see that you should use the bytea type. However, I plan using the above snippet to generate these digests, although I'm open to modifying it. Is there anything I should be aware of being sending this off to the DB assuming that I have a field of type bytea? Would this be the proper way of storing digests? Might be a redundant question, but I wanted to be sure. I'm just storing md5s of files and was planning on using the hash as a unique identifier; nothing mission critical.