import bcrypt
# example password
password = '1toto;2'
# converting password to array of bytes
bytes = password.encode('utf-8')
# generating the salt
salt = bcrypt.gensalt()
# Hashing the password
hash = bcrypt.hashpw(bytes, salt)
print(hash)
aW1wb3J0IGJjcnlwdAoKICMgZXhhbXBsZSBwYXNzd29yZCAKcGFzc3dvcmQgPSAnMXRvdG87MicKICAKIyBjb252ZXJ0aW5nIHBhc3N3b3JkIHRvIGFycmF5IG9mIGJ5dGVzIApieXRlcyA9IHBhc3N3b3JkLmVuY29kZSgndXRmLTgnKSAKICAKIyBnZW5lcmF0aW5nIHRoZSBzYWx0IApzYWx0ID0gYmNyeXB0LmdlbnNhbHQoKSAKICAKIyBIYXNoaW5nIHRoZSBwYXNzd29yZCAKaGFzaCA9IGJjcnlwdC5oYXNocHcoYnl0ZXMsIHNhbHQpIAogIApwcmludChoYXNoKQ==