Skip to content

Commit

Permalink
a bit rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Jan 11, 2025
1 parent 9f20d86 commit 6546518
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions firebirdsql/chacha.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def __init__(self, key, nonce, counter=0):
for i in range(0, len(block_bytes), 4):
state.append(bytes_to_uint(block_bytes[i:i+4]))
self.state = state
self.chacha20_round_block()
self.set_chacha20_round_block()

def chacha20_round_block(self):
def set_chacha20_round_block(self):
x = copy.copy(self.state)

for i in range(10):
Expand Down Expand Up @@ -148,7 +148,7 @@ def translate(self, plain):
if len(self.nonce) == 8:
# ChaCha64: 64 bit nonce, 64 bit counter
self.state[13] = bytes_to_uint(counter_bytes[4:])
self.chacha20_round_block()
self.set_chacha20_round_block()

return enc

Expand Down

0 comments on commit 6546518

Please sign in to comment.