import bcrypt
import base64


def get_log_psw_from_header(header):
    base64_log_psw = header.split(' ')[1]
    decoded_log_psw = base64.b64decode(base64_log_psw.encode('utf-8')).decode(
        'utf-8')
    lst_decode_log_psw = decoded_log_psw.split(':')
    return lst_decode_log_psw


def check_psw(decoded_psw, psw_from_db):
    check = bcrypt.checkpw(decoded_psw.encode(), psw_from_db.encode())
    return check


def password_hashing(password):
    hashed_psw = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
    return hashed_psw

503b2c2580d35db2b5fb4ddb910142dc3d450f19
<mask token>


def password_hashing(password):
    hashed_psw = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
    return hashed_psw

<mask token>


def get_log_psw_from_header(header):
    base64_log_psw = header.split(' ')[1]
    decoded_log_psw = base64.b64decode(base64_log_psw.encode('utf-8')).decode(
        'utf-8')
    lst_decode_log_psw = decoded_log_psw.split(':')
    return lst_decode_log_psw


<mask token>


def password_hashing(password):
    hashed_psw = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
    return hashed_psw

<mask token>


def get_log_psw_from_header(header):
    base64_log_psw = header.split(' ')[1]
    decoded_log_psw = base64.b64decode(base64_log_psw.encode('utf-8')).decode(
        'utf-8')
    lst_decode_log_psw = decoded_log_psw.split(':')
    return lst_decode_log_psw


def check_psw(decoded_psw, psw_from_db):
    check = bcrypt.checkpw(decoded_psw.encode(), psw_from_db.encode())
    return check


def password_hashing(password):
    hashed_psw = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
    return hashed_psw

import bcrypt
import base64


def get_log_psw_from_header(header):
    base64_log_psw = header.split(' ')[1]
    decoded_log_psw = base64.b64decode(base64_log_psw.encode('utf-8')).decode(
        'utf-8')
    lst_decode_log_psw = decoded_log_psw.split(':')
    return lst_decode_log_psw


def check_psw(decoded_psw, psw_from_db):
    check = bcrypt.checkpw(decoded_psw.encode(), psw_from_db.encode())
    return check


def password_hashing(password):
    hashed_psw = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
    return hashed_psw
