mirror of
https://github.com/morgan9e/noiseprotocol
synced 2026-04-14 00:14:05 +09:00
fix use of x25519 private keys (#29)
This underscore is a typo and causes errors to be thrown.
This commit is contained in:
committed by
Piotr Lizończyk
parent
6fc772aead
commit
3e3ff2af3c
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user