unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto
Kayode Odeyemi
dreyemi at gmail.com
Sat Oct 8 04:45:09 EDT 2011
On Sat, Oct 8, 2011 at 12:50 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> That latter function probably want integers code in range(256).
Yes! Non-unicode. The source reads:
def _encrypt(self, m):
# compute m**d (mod n)
return pow(m, self.e, self.n)
>From the source, it is provided as is.
The arguments must have numeric types
>
How come it accepts str type?
--
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111008/e1667819/attachment-0001.html>
More information about the Python-list
mailing list