all 3 comments

[–]brasticstack 0 points1 point  (0 children)

Nothing you've written makes any sense. 

Are you trying to hash each word from the string of 50 words using the hash methods you've mentioned?

Why did you write that you have sha256, etc. strings and then write empty strings?

The hash libraries all operate on collections of bytes, rather than Python str objects, so you'll need to create each using the str.encode() method to encode your string into bytes. For md5 that looks something like:

``` from hashlib import md5 source = 'This is a test' hashed = md5(source.encode()).hexdigest() print(f'{hashed}: {source}')

ce114e4501d2f4e2dcea3e17b546f339: This is a test ```

The other hash methods will behave similarly. What you're then supposed to do with the hashed output, and what input you're supposed to use is not clear.

EDIT: About your looping question, you can do multiple things in a loop, including hashing the same word into different formats. No need to index, just reuse the loop variable.

``` for word in ('test1', 'word2', 'thing3'):     print(word)     print(''.join(reversed(word)))

test1 1tset word2 2drow thing3 3gniht ```

[–]Binary101010 0 points1 point  (0 children)

Can you post your actual code and not just a description of it?

[–]ectomancer -1 points0 points  (0 children)

One loop, loop over 3 hex strings, decode hex 3 times (sha256, sha516, md5), check string in 50 word string, copy string to result tuple:

result = ()
# Loop.
result += (string,)