mirror of https://github.com/borgbackup/borg.git
cosmetic: move some lines
This commit is contained in:
parent
68ef5e8a4b
commit
e7228fa3a4
|
@ -373,9 +373,9 @@ cdef class AES256_CTR_BASE:
|
||||||
if isinstance(iv, int):
|
if isinstance(iv, int):
|
||||||
iv = iv.to_bytes(self.iv_len, byteorder='big')
|
iv = iv.to_bytes(self.iv_len, byteorder='big')
|
||||||
assert isinstance(iv, bytes) and len(iv) == self.iv_len
|
assert isinstance(iv, bytes) and len(iv) == self.iv_len
|
||||||
self.blocks = 0 # how many AES blocks got encrypted with this IV?
|
|
||||||
for i in range(self.iv_len):
|
for i in range(self.iv_len):
|
||||||
self.iv[i] = iv[i]
|
self.iv[i] = iv[i]
|
||||||
|
self.blocks = 0 # how many AES blocks got encrypted with this IV?
|
||||||
|
|
||||||
def next_iv(self):
|
def next_iv(self):
|
||||||
# call this after encrypt() to get the next iv (int) for the next encrypt() call
|
# call this after encrypt() to get the next iv (int) for the next encrypt() call
|
||||||
|
@ -645,9 +645,9 @@ cdef class _AEAD_BASE:
|
||||||
if isinstance(iv, int):
|
if isinstance(iv, int):
|
||||||
iv = iv.to_bytes(self.iv_len, byteorder='big')
|
iv = iv.to_bytes(self.iv_len, byteorder='big')
|
||||||
assert isinstance(iv, bytes) and len(iv) == self.iv_len
|
assert isinstance(iv, bytes) and len(iv) == self.iv_len
|
||||||
self.blocks = 0 # number of cipher blocks encrypted with this IV
|
|
||||||
for i in range(self.iv_len):
|
for i in range(self.iv_len):
|
||||||
self.iv[i] = iv[i]
|
self.iv[i] = iv[i]
|
||||||
|
self.blocks = 0 # number of cipher blocks encrypted with this IV
|
||||||
|
|
||||||
def next_iv(self):
|
def next_iv(self):
|
||||||
# call this after encrypt() to get the next iv (int) for the next encrypt() call
|
# call this after encrypt() to get the next iv (int) for the next encrypt() call
|
||||||
|
@ -809,9 +809,9 @@ cdef class AES:
|
||||||
if isinstance(iv, int):
|
if isinstance(iv, int):
|
||||||
iv = iv.to_bytes(self.iv_len, byteorder='big')
|
iv = iv.to_bytes(self.iv_len, byteorder='big')
|
||||||
assert isinstance(iv, bytes) and len(iv) == self.iv_len
|
assert isinstance(iv, bytes) and len(iv) == self.iv_len
|
||||||
self.blocks = 0 # number of cipher blocks encrypted with this IV
|
|
||||||
for i in range(self.iv_len):
|
for i in range(self.iv_len):
|
||||||
self.iv[i] = iv[i]
|
self.iv[i] = iv[i]
|
||||||
|
self.blocks = 0 # number of cipher blocks encrypted with this IV
|
||||||
|
|
||||||
def next_iv(self):
|
def next_iv(self):
|
||||||
# call this after encrypt() to get the next iv (int) for the next encrypt() call
|
# call this after encrypt() to get the next iv (int) for the next encrypt() call
|
||||||
|
|
Loading…
Reference in New Issue