Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ecf9b43f authored by BOULLE Olivier's avatar BOULLE Olivier
Browse files

correct comment

parent dc01c624
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ def hash_string_to_formated_base2(input_string: str, hash_size: int) -> str: ...@@ -56,7 +56,7 @@ def hash_string_to_formated_base2(input_string: str, hash_size: int) -> str:
we count the needed number of basic hash to get to the wanted hash size / 2, because the size of the hash will be doubled in base 4 we count the needed number of basic hash to get to the wanted hash size / 2, because the size of the hash will be doubled in base 4
then the input string is hashed with a "A" +k added at the end ( k is an incremented hash_number) then the input string is hashed with a "A" +k added at the end ( k is an incremented hash_number)
the multiples hash are then concatenated to have a total hash of the wanted size /2 (rounded up to 64) the multiples hash are then concatenated to have a total hash of the wanted size /2 (rounded up to 64)
the total hash is then reduced in base 4, and brought to the exact wanted size the total hash is then reduced in base 2, and brought to the exact wanted size
""" """
hash_number = (hash_size/4) // 64 +1 hash_number = (hash_size/4) // 64 +1
total_hash = "" total_hash = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment