def pseudonymize(self, s): sl = len(s) / 2 return struct.unpack('<%dh' % sl, s)