def _bytelist2longBigEndian(list):
 imax = (len(list) / 4)
 hl = ([0L] * imax)
 j = 0
 i = 0
 while (i < imax):
  b0 = (long(ord(list[j])) << 24)
  b1 = (long(ord(list[(j + 1)])) << 16)
  b2 = (long(ord(list[(j + 2)])) << 8)
  b3 = long(ord(list[(j + 3)]))
  hl[i] = (((b0 | b1) | b2) | b3)
  i = (i + 1)
  j = (j + 4)
 return hl

def _bytelist2longBigEndian ( list ) : imax = ( len ( list ) / 4 ) hl = ( [ 0 L ] * imax ) j = 0 i = 0 while ( i < imax ) : b0 = ( long ( ord ( list [ j ] ) ) << 24 ) b1 = ( long ( ord ( list [ ( j + 1 ) ] ) ) << 16 ) b2 = ( long ( ord ( list [ ( j + 2 ) ] ) ) << 8 ) b3 = long ( ord ( list [ ( j + 3 ) ] ) ) hl [ i ] = ( ( ( b0 | b1 ) | b2 ) | b3 ) i = ( i + 1 ) j = ( j + 4 ) return hl
transform a list of characters into a list of longs .