[Zope] Generating unique keys
Pavlos Christoforou
pavlos@gaaros.msrc.sunysb.edu
Sun, 10 Oct 1999 22:37:41 -0400 (EDT)
On Mon, 11 Oct 1999, gtk wrote:
> Here's something wierd, though:
>
> <dtml-var expr="md5er(id)">
>
This is one of Zope's idiosyncrasies. id is ctually a metho when called in
this manner.
<dtml-var expr="md5er(id())"> should work
you can use module binascii to convert it to base64 like
import binascii
binascii.b2a_base64(a.digest())[:-1]
this will return a base64 representation of your digest, and it will also
strip the trailing newline.
Pavlos