'Unwraps the private key into an RSAPrivateKey, DSAPrivateKey or
ECPrivateKey object
:return:
An RSAPrivateKey, DSAPrivateKey or ECPrivateKey object'

def unwrap(self):

    if (self.algorithm == u'rsa'):
        return self[u'private_key'].parsed
    if (self.algorithm == u'dsa'):
        params = self[u'private_key_algorithm'][u'parameters']
        return DSAPrivateKey({u'version': 0, u'p': params[u'p'], u'q': params[u'q'], u'g': params[u'g'], u'public_key': self.public_key, u'private_key': self[u'private_key'].parsed})
    if (self.algorithm == u'ec'):
        output = self[u'private_key'].parsed
        output[u'parameters'] = self[u'private_key_algorithm'][u'parameters']
        output[u'public_key'] = self.public_key
        return output
