pyssb/ssb/tests/test_shs.py

18 lines
337 B
Python
Raw Normal View History

2017-05-25 10:47:01 +00:00
import hashlib
import pytest
from nacl.public import PrivateKey
from ssb.shs import SecretHandShake
@pytest.fixture()
def appkey():
return hashlib.sha256(b'app_key').digest()
def test_client_challenge(appkey):
pk = PrivateKey.generate()
shs = SecretHandShake(pk, application_key=appkey)
assert shs.client_challenge