def string_to_int(s):
 result = 0
 for c in s:
  if (not isinstance(c, int)):
   c = ord(c)
  result = ((256 * result) + c)
 return result

def string_to_int ( s ) : result = 0 for c in s : if ( not isinstance ( c , int ) ) : c = ord ( c ) result = ( ( 256 * result ) + c ) return result
convert a string of bytes into an integer .