md5 from python different then md5 from command line

Paul Rubin http
Sun May 7 13:29:51 EDT 2006


"Marius Ursache" <ursache.marius at gmail.com> writes:
> >    >>> import md5
> >    >>> test = md5.new("marius\n")
> >    >>> print test.hexdigest()
> >    0f0f60ac801a9eec2163083a22307deb
> 
> Thanks, that was it ;)

Also, the -n option suppresses the newline from echo:

$ echo -n marius | md5sum
242aa1a97769109065e3b4df359bcfc9  -



More information about the Python-list mailing list