[Tutor] hash.update( argv[0] )

George Georgalis george at galis.org
Mon Apr 24 02:43:04 CEST 2006


Hi! I've been struggling to find a way up seed hash.update() with
the sha1 (or similar) of the file that is the program running.

this is not a security task but rather a means to generate
reasonably unique filenames based on various parameters including
changes to the program: name = hash.hexdigest()

so new files are generated when the program or parameters are
changed; but cached files are used when identical results are
expected.

help! I cannot figure out how to pass the program body as a seed
to hash.update().

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george at galis.org


More information about the Tutor mailing list