Skip to content

Commit 35e962d

Browse files
committed
Reformatting with Black
No functional changes.
1 parent 7bdbdaa commit 35e962d

26 files changed

+723
-577
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ build-backend = "poetry.core.masonry.api"
5151
"pyrsa-decrypt" = "rsa.cli:decrypt"
5252
"pyrsa-sign" = "rsa.cli:sign"
5353
"pyrsa-verify" = "rsa.cli:verify"
54+
55+
[tool.black]
56+
line-length = 100

rsa/__init__.py

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,39 @@
2222
"""
2323

2424
from rsa.key import newkeys, PrivateKey, PublicKey
25-
from rsa.pkcs1 import encrypt, decrypt, sign, verify, DecryptionError, \
26-
VerificationError, find_signature_hash, sign_hash, compute_hash
25+
from rsa.pkcs1 import (
26+
encrypt,
27+
decrypt,
28+
sign,
29+
verify,
30+
DecryptionError,
31+
VerificationError,
32+
find_signature_hash,
33+
sign_hash,
34+
compute_hash,
35+
)
2736

2837
__author__ = "Sybren Stuvel, Barry Mead and Yesudeep Mangalapilly"
29-
__date__ = '2021-02-24'
30-
__version__ = '4.8-dev0'
38+
__date__ = "2021-02-24"
39+
__version__ = "4.8-dev0"
3140

3241
# Do doctest if we're run directly
3342
if __name__ == "__main__":
3443
import doctest
3544

3645
doctest.testmod()
3746

38-
__all__ = ["newkeys", "encrypt", "decrypt", "sign", "verify", 'PublicKey',
39-
'PrivateKey', 'DecryptionError', 'VerificationError',
40-
'find_signature_hash', 'compute_hash', 'sign_hash']
47+
__all__ = [
48+
"newkeys",
49+
"encrypt",
50+
"decrypt",
51+
"sign",
52+
"verify",
53+
"PublicKey",
54+
"PrivateKey",
55+
"DecryptionError",
56+
"VerificationError",
57+
"find_signature_hash",
58+
"compute_hash",
59+
"sign_hash",
60+
]

rsa/asn1.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@
2222

2323
class PubKeyHeader(univ.Sequence):
2424
componentType = namedtype.NamedTypes(
25-
namedtype.NamedType('oid', univ.ObjectIdentifier()),
26-
namedtype.NamedType('parameters', univ.Null()),
25+
namedtype.NamedType("oid", univ.ObjectIdentifier()),
26+
namedtype.NamedType("parameters", univ.Null()),
2727
)
2828

2929

3030
class OpenSSLPubKey(univ.Sequence):
3131
componentType = namedtype.NamedTypes(
32-
namedtype.NamedType('header', PubKeyHeader()),
33-
34-
# This little hack (the implicit tag) allows us to get a Bit String as Octet String
35-
namedtype.NamedType('key', univ.OctetString().subtype(
36-
implicitTag=tag.Tag(tagClass=0, tagFormat=0, tagId=3))),
32+
namedtype.NamedType("header", PubKeyHeader()),
33+
# This little hack (the implicit tag) allows us to get a Bit String as Octet String
34+
namedtype.NamedType(
35+
"key",
36+
univ.OctetString().subtype(implicitTag=tag.Tag(tagClass=0, tagFormat=0, tagId=3)),
37+
),
3738
)
3839

3940

@@ -46,6 +47,6 @@ class AsnPubKey(univ.Sequence):
4647
"""
4748

4849
componentType = namedtype.NamedTypes(
49-
namedtype.NamedType('modulus', univ.Integer()),
50-
namedtype.NamedType('publicExponent', univ.Integer()),
50+
namedtype.NamedType("modulus", univ.Integer()),
51+
namedtype.NamedType("publicExponent", univ.Integer()),
5152
)

0 commit comments

Comments
 (0)