fix use of x25519 private keys (#29)

This underscore is a typo and causes errors to be thrown.
This commit is contained in:
Drew Harwell
2019-02-24 05:27:23 -06:00
committed by Piotr Lizończyk
parent 6fc772aead
commit 3e3ff2af3c

View File

@@ -162,7 +162,7 @@ class KeyPair25519(_KeyPair):
def from_private_bytes(cls, private_bytes):
if len(private_bytes) != 32:
raise NoiseValueError('Invalid length of private_bytes! Should be 32')
private = x25519.X25519PrivateKey._from_private_bytes(private_bytes)
private = x25519.X25519PrivateKey.from_private_bytes(private_bytes)
public = private.public_key()
return cls(private=private, public=public, public_bytes=public.public_bytes())