mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-06-27 19:06:12 +02:00
Improved code style.
This commit is contained in:
parent
9b216d9d59
commit
71f6c08c28
19 changed files with 335 additions and 253 deletions
|
@ -41,9 +41,7 @@ def a2bits(chars: str) -> str:
|
|||
>>> a2bits("Hello World!")
|
||||
'010010000110010101101100011011000110111100100000010101110110111101110010011011000110010000100001'
|
||||
"""
|
||||
return bin(reduce(lambda x, y: (x << 8) + y, (ord(c) for c in chars), 1))[
|
||||
3:
|
||||
]
|
||||
return bin(reduce(lambda x, y: (x << 8) + y, (ord(c) for c in chars), 1))[3:]
|
||||
|
||||
|
||||
def a2bits_list(chars: str, encoding: str = "UTF-8") -> List[str]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue