Fix import order

This commit is contained in:
Pedro Ferreira 2018-02-04 15:50:56 +01:00
parent 9fcb0bc20f
commit 7949cba7d7
6 changed files with 8 additions and 12 deletions

View File

@ -1,14 +1,12 @@
import os
import yaml
from asyncio import get_event_loop
from base64 import b64decode
import yaml
from nacl.signing import SigningKey
from secret_handshake import SHSClient
with open(os.path.expanduser('~/.ssb/secret')) as f:
config = yaml.load(f)

View File

@ -1,14 +1,12 @@
import os
import yaml
from asyncio import get_event_loop
from base64 import b64decode
import yaml
from nacl.signing import SigningKey
from secret_handshake import SHSServer
with open(os.path.expanduser('~/.ssb/secret')) as f:
config = yaml.load(f)

View File

@ -2,10 +2,9 @@ import struct
from asyncio import IncompleteReadError
from async_generator import async_generator, yield_
from nacl.secret import SecretBox
from .util import split_chunks, inc_nonce
from .util import inc_nonce, split_chunks
HEADER_LENGTH = 2 + 16 + 16
MAX_SEGMENT_SIZE = 4 * 1024

View File

@ -23,7 +23,8 @@ import hashlib
import hmac
from base64 import b64decode
from nacl.bindings import crypto_scalarmult, crypto_box_afternm, crypto_box_open_afternm
from nacl.bindings import (crypto_box_afternm, crypto_box_open_afternm,
crypto_scalarmult)
from nacl.exceptions import CryptoError
from nacl.public import PrivateKey
from nacl.signing import VerifyKey

View File

@ -21,10 +21,11 @@
import pytest
from .test_crypto import (CLIENT_ENCRYPT_KEY, CLIENT_ENCRYPT_NONCE)
from secret_handshake.boxstream import BoxStream, UnboxStream, HEADER_LENGTH
from secret_handshake.boxstream import HEADER_LENGTH, BoxStream, UnboxStream
from secret_handshake.util import AsyncBuffer, async_comprehend
from .test_crypto import CLIENT_ENCRYPT_KEY, CLIENT_ENCRYPT_NONCE
MESSAGE_1 = (b'\xcev\xedE\x06l\x02\x13\xc8\x17V\xfa\x8bZ?\x88B%O\xb0L\x9f\x8e\x8c0y\x1dv\xc0\xc9\xf6\x9d\xc2\xdf\xdb'
b'\xee\x9d')
MESSAGE_2 = b"\x141\xd63\x13d\xd1\xecZ\x9b\xd0\xd4\x03\xcdR?'\xaa.\x89I\x92I\xf9guL\xaa\x06?\xea\xca/}\x88*\xb2"

View File

@ -22,7 +22,6 @@
import struct
from io import BytesIO
NONCE_SIZE = 24
MAX_NONCE = (8 * NONCE_SIZE)