Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://github.com/NotStatilko/NonCipher
- # t.me/not_statilko
- from hashlib import md5
- def secure_password(password,salt,iterations):
- '''
- Function for generating strong password
- param password: your regular password
- used to make it secure.
- [type must be bytes].
- param salt: salt for hashing.
- you can use any word you won't forget
- [type must be bytes].
- param iterations: number of iterations
- over hash.
- [type must be int]
- '''
- for i in range(iterations):
- password = md5(password + salt).digest()
- return md5(password).hexdigest()
- if __name__ == '__main__':
- standart_password = 'QWERTY'.encode()
- secret_word = '@not_statilko'.encode()
- iteration_count = 220302
- print(secure_password(
- standart_password,
- secret_word,
- iteration_count))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement