import hashlib
def mysql5_sha1(password):
password_bytes = password.encode('utf-8')
sha1_hash_1 = hashlib.sha1(password_bytes).digest()
sha1_hash_2 = hashlib.sha1(sha1_hash_1).digest()
mysql5_hash = '*' + sha1_hash_2.hex().upper()
return mysql5_hash
mysql5_sha1("orneksifre")