title: Convert python long/int to fixed size byte array
body: <p>I'm trying to implement RC4 and DH key exchange in python. Problem is that I have no idea about how to convert the python long/int from the key exchange to the byte array I need for the RC4 implementation. Is there a simple way to convert a long to the required length byte array?</p>
  
  <p><strong>Update</strong>: forgot to mention that the numbers I'm dealing with are 768 bit unsigned integers.</p>