>>> Or hexdigest_string.decode('hex')
>> I would advise against this, as it's incompatible with Python 3.
>
> I didn't know that, you actually made me look it up in the Python 3
> FAQ. And yes, the difference is that decode will return bytes type
> instead of a string.
No. The decode method on st
Martin v. Löwis napisał(a):
> > Or hexdigest_string.decode('hex')
>
> I would advise against this, as it's incompatible with Python 3.
I didn't know that, you actually made me look it up in the Python 3
FAQ. And yes, the difference is that decode will return bytes type
instead of a string. This ma
> Or hexdigest_string.decode('hex')
I would advise against this, as it's incompatible with Python 3.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis napisał(a):
> > How can convert string from sha1.hexdigest() to string that is the
> > same, like from sha1.digest()
>
> Use binascii.unhexlify.
>
> HTH,
> Martin
Or hexdigest_string.decode('hex')
--
http://mail.python.org/mailman/listinfo/python-list
> How can convert string from sha1.hexdigest() to string that is the
> same, like from sha1.digest()
Use binascii.unhexlify.
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list