Skip to content

Commit

Permalink
dup_lines (#853)
Browse files Browse the repository at this point in the history
* dup_lines

* lint

* fix sphinx keys

---------

Co-authored-by: Gonzalo Atienza <[email protected]>
  • Loading branch information
gonatienza and Gonzalo Atienza authored Feb 5, 2025
1 parent 932bd6c commit 9ffa598
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sphinx:
# The config file overrides the UI settings:
# https://github.com/pyca/cryptography/issues/5863#issuecomment-817828152
builder: dirhtml
configuration: docs/conf.py

build:
os: "ubuntu-20.04"
Expand Down
2 changes: 0 additions & 2 deletions src/nacl/bindings/crypto_aead.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ def crypto_aead_chacha20poly1305_encrypt(
_aad = ffi.NULL
aalen = 0

mlen = len(message)
mxout = mlen + crypto_aead_chacha20poly1305_ietf_ABYTES

clen = ffi.new("unsigned long long *")
Expand Down Expand Up @@ -466,7 +465,6 @@ def crypto_aead_xchacha20poly1305_ietf_encrypt(
_aad = ffi.NULL
aalen = 0

mlen = len(message)
mxout = mlen + crypto_aead_xchacha20poly1305_ietf_ABYTES

clen = ffi.new("unsigned long long *")
Expand Down
18 changes: 9 additions & 9 deletions tests/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def test_sha256_hex(inp: bytes, expected: bytes):
(
b"The quick brown fox jumps over the lazy dog.",
(
b"\xEFS\x7F%\xC8\x95\xBF\xA7\x82Re)\xA9\xB6=\x97\xAAc\x15d\xD5\xD7"
b"\x89\xC2\xB7eD\x8C\x865\xFBl"
b"\xefS\x7f%\xc8\x95\xbf\xa7\x82Re)\xa9\xb6=\x97\xaac\x15d\xd5\xd7"
b"\x89\xc2\xb7eD\x8c\x865\xfbl"
),
),
(
Expand Down Expand Up @@ -86,18 +86,18 @@ def test_sha512_hex(inp: bytes, expected: bytes):
(
b"The quick brown fox jumps over the lazy dog.",
(
b"\x91\xEA\x12E\xF2\rF\xAE\x9A\x03z\x98\x9FT\xF1\xF7\x90\xF0\xA4v\a"
b"\xEE\xB8\xA1M\x12\x89\f\xEAw\xA1\xBB\xC6\xC7\xED\x9C\xF2\x05\xE6{"
b"\x7F+\x8F\xD4\xC7\xDF\xD3\xA7\xA8a~E\xF3\xC4c\xD4\x81\xC7\xE5\x86"
b"\xC3\x9A\xC1\xED"
b"\x91\xea\x12E\xf2\rF\xae\x9a\x03z\x98\x9fT\xf1\xf7\x90\xf0\xa4v\a"
b"\xee\xb8\xa1M\x12\x89\f\xeaw\xa1\xbb\xc6\xc7\xed\x9c\xf2\x05\xe6{"
b"\x7f+\x8f\xd4\xc7\xdf\xd3\xa7\xa8a~E\xf3\xc4c\xd4\x81\xc7\xe5\x86"
b"\xc3\x9a\xc1\xed"
),
),
(
b"",
(
b"\xCF\x83\xE15~\xEF\xB8\xBD\xF1T(P\xD6m\x80\a\xD6 \xE4\x05\vW\x15"
b"\xDC\x83\xF4\xA9!\xD3l\xE9\xCEG\xD0\xD1<]\x85\xF2\xB0\xFF\x83\x18"
b"\xD2\x87~\xEC/c\xB91\xBDGAz\x81\xA582z\xF9'\xDA>"
b"\xcf\x83\xe15~\xef\xb8\xbd\xf1T(P\xd6m\x80\a\xd6 \xe4\x05\vW\x15"
b"\xdc\x83\xf4\xa9!\xd3l\xe9\xceG\xd0\xd1<]\x85\xf2\xb0\xff\x83\x18"
b"\xd2\x87~\xec/c\xb91\xbdGAz\x81\xa582z\xf9'\xda>"
),
),
],
Expand Down

0 comments on commit 9ffa598

Please sign in to comment.