3 lá˜_a ã@sxddlmZmZmZddlZddlZddlmZmZdZ dZ ej ej ƒGdd„de ƒƒZej ej ƒGdd „d e ƒƒZdS) é)Úabsolute_importÚdivisionÚprint_functionN)ÚUnsupportedAlgorithmÚ_Reasonsé é@c@s4eZdZedd„ƒZejdd„ƒZejdd„ƒZdS)ÚEd25519PublicKeycCs*ddlm}|jƒs tdtjƒ‚|j|ƒS)Nr)Úbackendz4ed25519 is not supported by this version of OpenSSL.)Ú,cryptography.hazmat.backends.openssl.backendr Úed25519_supportedrrÚ UNSUPPORTED_PUBLIC_KEY_ALGORITHMZed25519_load_public_bytes)ÚclsÚdatar ©rú/usr/lib64/python3.6/ed25519.pyÚfrom_public_bytess  z"Ed25519PublicKey.from_public_bytescCsdS)z9 The serialized bytes of the public key. Nr)ÚselfÚencodingÚformatrrrÚ public_bytes szEd25519PublicKey.public_bytescCsdS)z' Verify the signature. Nr)rZ signaturerrrrÚverify&szEd25519PublicKey.verifyN) Ú__name__Ú __module__Ú __qualname__Ú classmethodrÚabcÚabstractmethodrrrrrrr s r c@sNeZdZedd„ƒZedd„ƒZejdd„ƒZejdd„ƒZ ejd d „ƒZ d S) ÚEd25519PrivateKeycCs(ddlm}|jƒs tdtjƒ‚|jƒS)Nr)r z4ed25519 is not supported by this version of OpenSSL.)r r r rrr Zed25519_generate_key)rr rrrÚgenerate/s  zEd25519PrivateKey.generatecCs*ddlm}|jƒs tdtjƒ‚|j|ƒS)Nr)r z4ed25519 is not supported by this version of OpenSSL.)r r r rrr Zed25519_load_private_bytes)rrr rrrÚfrom_private_bytes;s  z$Ed25519PrivateKey.from_private_bytescCsdS)zD The Ed25519PublicKey derived from the private key. Nr)rrrrÚ public_keyGszEd25519PrivateKey.public_keycCsdS)z: The serialized bytes of the private key. Nr)rrrZencryption_algorithmrrrÚ private_bytesMszEd25519PrivateKey.private_bytescCsdS)z! Signs the data. Nr)rrrrrÚsignSszEd25519PrivateKey.signN) rrrrrr rrr!r"r#rrrrr-s  r)Z __future__rrrrZsixZcryptography.exceptionsrrZ_ED25519_KEY_SIZEZ_ED25519_SIG_SIZEZ add_metaclassÚABCMetaÚobjectr rrrrrÚs