[#1] Add cryptography methods
Signed-off-by: ilyas585 <niyazov2023@gmail.com>
This commit is contained in:
parent
480d288e2a
commit
19282f13cc
14 changed files with 268 additions and 0 deletions
18
tests/helpers/convert.py
Normal file
18
tests/helpers/convert.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
def convert_bytes_format_127_to_256(numbers: list[int]):
|
||||
new_list = []
|
||||
for num in numbers:
|
||||
if num > 0:
|
||||
new_list.append(num)
|
||||
else:
|
||||
new_list.append(num + 256)
|
||||
return new_list
|
||||
|
||||
|
||||
def convert_bytes_format_256_to_127(numbers: list[int]):
|
||||
new_list = []
|
||||
for num in numbers:
|
||||
if num < 128:
|
||||
new_list.append(num)
|
||||
else:
|
||||
new_list.append(num - 256)
|
||||
return new_list
|
Loading…
Add table
Add a link
Reference in a new issue