Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Source_Encoding
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
dnarXiv
Source_Encoding
Commits
ecf9b43f
Commit
ecf9b43f
authored
2 years ago
by
BOULLE Olivier
Browse files
Options
Downloads
Patches
Plain Diff
correct comment
parent
dc01c624
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hashing.py
+1
-1
1 addition, 1 deletion
hashing.py
with
1 addition
and
1 deletion
hashing.py
+
1
−
1
View file @
ecf9b43f
...
@@ -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
=
""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment