Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

SimpleEncode Hash

Zagir Medzhidov edited this page Feb 22, 2024 · 2 revisions

Documentation SimpleEncoder Hash:

Starting md5:

from SimpleEncoder import SimpleEncode as SE
# or:
# from SimpleEncoder.hash import Hash

str_hashed = SE.Hash(config: Config = Config()).md5(string: str)

# Real Example:

string = "HashMe"

str_hashed = SE.Hash().md5(string)
print(str_hashed)

Run it and check out the code!

Arguments:

  • config:Config -> The configuration we set up in the last example. Optional
  • md5(string: str -> Text for hashing. Required!)

Starting password:

from SimpleEncoder import SimpleEncode as SE
# or:
# from SimpleEncoder.hash import Hash

password_hashed = SE.Hash(config: Config = Config()).password(string: str)

# Real Example:

string = "Im.Password.HashMe"

password_hashed = SE.Hash().password(string)
print(password_hashed)

Run it and check out the code!

Arguments:

  • config:Config -> The configuration we set up in the last example. Optional
  • password(string: str -> Password for hashing. Required!)

Starting password equals:

from SimpleEncoder import SimpleEncode as SE
# or:
# from SimpleEncoder.hash import Hash

password_hashed = SE.Hash(config: Config = Config()).password_equals(password:str, string: str)

# Real Example:

string = "Im.Password.HashMe"
invalidPassword = "Im_Password_HashMe"

hash = SE.Hash()

password_hashed = hash().password(string)
password_equals = hash().password_equals(password_hashed, string)
print(password_equals) # True!
password_equals = hash().password_equals(password_hashed, invalidPassword)
print(password_equals) # False!

Run it and check out the code!

Arguments:

  • config:Config -> The configuration we set up in the last example. Optional
  • password(password: str -> A password that is hashed. Required!)
  • password(string: str -> Password for hashing and check equals. Required!)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.