Returns binary string representation of this struct.
        
        :returns: Structure encoded as binary string for keepass database.
        :rtype: bytes

def encode(self):
        """
        Returns binary string representation of this struct.
        
        :returns: Structure encoded as binary string for keepass database.
        :rtype: bytes
        """
        ret = bytearray()
        for name, len, typecode in self.format:
            value = getattr(self, name)
            buf = struct.pack('<' + typecode, value)
            ret.extend(buf)
        return bytes(ret)