'Serialize the object into a dictionary.'

def dump(self):

    result = {'size': self.size, 'filename': self.path, 'changed': self.changed, 'fingerprint': self.fingerprint}
    if (self.type == crypto.TYPE_RSA):
        result['type'] = 'RSA'
    else:
        result['type'] = 'DSA'
    return result
