Re: python number handling - tiny encryption algorithm



Kinsley Turner <kingsleyturner@xxxxxxxxxxxxxx> writes:
> In my version, I end up with hugely long integers, which have obviously
> not be constrained into the 4-byte unsigned longs that TEA is expecting.

Yeah, Python promotes to long int now. The simplest way to do the
32-bit arithmetic you need is probably with the array module.
.



Relevant Pages

  • Re: Non Continuous Subsequences
    ... v1) original eager Python+Psyco version ... v6) lazy D version with my libs ... lazy Python version, no allocations ... int n = len; ...
    (comp.lang.python)
  • Re: Why is java considered a language for "web" or "internet" programming?
    ... I don't remember reading exact things about Perl interpreter, ... load and parse bytecodes. ... I think, integer in Perl or Python or other scripting languages is some structure, with at the least field for type and value, and pointer to this structure you hold in 'i' variable. ... const int NNUM = 1000000; ...
    (comp.lang.java.help)
  • Re: Official definition of call-by-value (Re: Finding the instance reference...)
    ... Yes, which is why we have int, str, and list classes which, unlike some ... Since pickle can't predict what aspects of the ... you can't do so in Python. ... with a foo attribute. ...
    (comp.lang.python)
  • Re: Table Oriented Programming
    ... > Yeah, yeah, another X-Oriented paradigm, but please hear me out. ... > I have recently been studying up on EJB's in order to extend my resume. ... > Python, would be a more natural fit. ... > employees = EmployeeTable ...
    (comp.lang.python)
  • Re: [BUG] IMO, but no opinions? Uncle Tim? was: int(float(sys.maxint)) buglet ?
    ... > Ok, I understand the expediency of that policy, but what is now the meaning ... > transparent unification of int and long to a single integer type? ... Python isn't C, and the ... "shouldn't" bother anyone. ...
    (comp.lang.python)