def signature(self, block_size=None):
        "Calculates signature for local file."
        kwargs = {}
        if block_size:
            kwargs['block_size'] = block_size
        return librsync.signature(open(self.path, 'rb'), **kwargs)