Skip to content

Commit c960408

Browse files
committed
PEP-8
1 parent f38027d commit c960408

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

tests/test_07_jwe.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# from __future__ import print_function
2+
import array
23
import hashlib
34
import os
45
import string
56
import sys
6-
import array
77

88
import pytest
99
from cryptography.hazmat.backends import default_backend
@@ -14,26 +14,24 @@
1414
from cryptojwt.exception import MissingKey
1515
from cryptojwt.exception import Unsupported
1616
from cryptojwt.exception import VerificationError
17+
from cryptojwt.jwe.aes import AES_CBCEncrypter
18+
from cryptojwt.jwe.aes import AES_GCMEncrypter
1719
from cryptojwt.jwe.exception import NoSuitableDecryptionKey
1820
from cryptojwt.jwe.exception import NoSuitableEncryptionKey
1921
from cryptojwt.jwe.exception import UnsupportedBitLength
2022
from cryptojwt.jwe.exception import WrongEncryptionAlgorithm
21-
from cryptojwt.utils import b64e, as_bytes
22-
23-
from cryptojwt.jwe.aes import AES_CBCEncrypter
24-
from cryptojwt.jwe.aes import AES_GCMEncrypter
2523
from cryptojwt.jwe.jwe import JWE
2624
from cryptojwt.jwe.jwe import factory
2725
from cryptojwt.jwe.jwe_ec import JWE_EC
28-
from cryptojwt.jwe.jwe_rsa import JWE_RSA
2926
from cryptojwt.jwe.jwe_hmac import JWE_SYM
27+
from cryptojwt.jwe.jwe_rsa import JWE_RSA
3028
from cryptojwt.jwe.utils import split_ctx_and_tag
31-
3229
from cryptojwt.jwk.ec import ECKey
3330
from cryptojwt.jwk.hmac import SYMKey
34-
from cryptojwt.jwk.rsa import import_private_rsa_key_from_file
3531
from cryptojwt.jwk.rsa import RSAKey
36-
32+
from cryptojwt.jwk.rsa import import_private_rsa_key_from_file
33+
from cryptojwt.utils import as_bytes
34+
from cryptojwt.utils import b64e
3735

3836
__author__ = 'rohe0002'
3937

@@ -129,8 +127,8 @@ def test_jwe_09_a1():
129127
assert bytes2intarr(tag) == [130, 17, 32, 198, 120, 167, 144, 113, 0,
130128
50, 158, 49, 102, 208, 118, 152]
131129

132-
#tag = long2hexseq(tag)
133-
#iv = long2hexseq(iv)
130+
# tag = long2hexseq(tag)
131+
# iv = long2hexseq(iv)
134132
res = b".".join([b64_header, b64_ejek, b64e(iv), b64e(ctxt), b64e(tag)])
135133

136134
# print(res.split(b'.'))
@@ -154,7 +152,7 @@ def test_aesgcm_bit_length():
154152
enc_msg = encrypter.encrypt(b'Murder must advertise.',
155153
b'Dorothy L. Sayers')
156154
ctx, tag = split_ctx_and_tag(enc_msg)
157-
_msg = encrypter.decrypt(ctx, iv=b'Dorothy L. Sayers',tag=tag)
155+
_msg = encrypter.decrypt(ctx, iv=b'Dorothy L. Sayers', tag=tag)
158156
assert _msg == b'Murder must advertise.'
159157

160158

0 commit comments

Comments
 (0)