Skip to content

Commit 41fd206

Browse files
committed
reformat
1 parent 680877c commit 41fd206

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/cryptojwt/jws/dsa.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def sign(self, msg, key):
4040
"""
4141

4242
if not isinstance(key, ec.EllipticCurvePrivateKey):
43-
raise TypeError("The private key must be an instance of " "ec.EllipticCurvePrivateKey")
43+
raise TypeError("The private key must be an instance of ec.EllipticCurvePrivateKey")
4444

4545
self._cross_check(key.public_key())
4646
num_bits = key.curve.key_size
@@ -62,7 +62,7 @@ def verify(self, msg, sig, key):
6262
:return: True
6363
"""
6464
if not isinstance(key, ec.EllipticCurvePublicKey):
65-
raise TypeError("The public key must be an instance of " "ec.EllipticCurvePublicKey")
65+
raise TypeError("The public key must be an instance of ec.EllipticCurvePublicKey")
6666
self._cross_check(key)
6767

6868
num_bits = key.curve.key_size

tests/test_02_jwk.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ def test_serialize_rsa_priv_key():
150150
ECKEY = {
151151
"crv": "P-521",
152152
"x": "AekpBQ8ST8a8VcfVOTNl353vSrDCLLJXmPk06wTjxrrjcBpXp5EOnYG_NjFZ6OvLFV1jSfS9tsz4qUxcWceqwQGk",
153-
"y": "ADSmRA43Z1DSNx_RvcLI87cdL07l6jQyyBXMoxVg_l2Th"
154-
"-x3S1WDhjDly79ajL4Kkd0AZMaZmh9ubmf63e3kyMj2",
153+
"y": "ADSmRA43Z1DSNx_RvcLI87cdL07l6jQyyBXMoxVg_l2Th-x3S1WDhjDly79ajL4Kkd0AZMaZmh9ubmf63e3kyMj2",
155154
"d": "AY5pb7A0UFiB3RELSD64fTLOSV_jazdF7fLYyuTw8lOfRhWg6Y6rUrPAxerEzgdRhajnu0ferB0d53vM9mE15j2C",
156155
}
157156

tests/test_03_key_bundle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def full_path(local_file):
7474
"kid": "rsa1",
7575
},
7676
{
77-
"k": "YTEyZjBlMDgxMGI4YWU4Y2JjZDFiYTFlZTBjYzljNDU3YWM0ZWNiNzhmNmFlYTNkNT" "Y0NzMzYjE",
77+
"k": "YTEyZjBlMDgxMGI4YWU4Y2JjZDFiYTFlZTBjYzljNDU3YWM0ZWNiNzhmNmFlYTNkNTY0NzMzYjE",
7878
"kty": "oct",
7979
},
8080
]

tests/test_06_jws.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def test_a_1_1a():
418418

419419

420420
def test_a_1_1b():
421-
payload = b'{"iss":"joe",\r\n "exp":1300819380,' b'\r\n "http://example.com/is_root":true}'
421+
payload = b'{"iss":"joe",\r\n "exp":1300819380,\r\n "http://example.com/is_root":true}'
422422
val = b64e(payload)
423423
assert val == (
424424
b"eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9"
@@ -430,7 +430,7 @@ def test_a_1_1c():
430430
hmac = intarr2bin(HMAC_KEY)
431431
signer = SIGNER_ALGS["HS256"]
432432
header = b'{"typ":"JWT",\r\n "alg":"HS256"}'
433-
payload = b'{"iss":"joe",\r\n "exp":1300819380,' b'\r\n "http://example.com/is_root":true}'
433+
payload = b'{"iss":"joe",\r\n "exp":1300819380,\r\n "http://example.com/is_root":true}'
434434
sign_input = b64e(header) + b"." + b64e(payload)
435435
sig = signer.sign(sign_input, hmac)
436436
assert b64e(sig) == b"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"

0 commit comments

Comments
 (0)