'Key.fromString generates ECDSA keys from blobs.'

def test_fromBlobECDSA(self):

    from cryptography import utils
    ecPublicData = {'x': keydata.ECDatanistp256['x'], 'y': keydata.ECDatanistp256['y'], 'curve': keydata.ECDatanistp256['curve']}
    ecblob = ((common.NS(ecPublicData['curve']) + common.NS(ecPublicData['curve'][(-8):])) + common.NS((('\x04' + utils.int_to_bytes(ecPublicData['x'], 32)) + utils.int_to_bytes(ecPublicData['y'], 32))))
    eckey = keys.Key.fromString(ecblob)
    self.assertTrue(eckey.isPublic())
    self.assertEqual(ecPublicData, eckey.data())
