import base64


def to_base64_creds(user, password):
	"""
	create a BasicAuth (user:pwd) encoded in Base64
	:param user: to be encoded
	:param password: to be encoded
	:return: an str that represents 'user:pwd' encoded in Base64
	"""
	message_bytes = "{}:{}".format(user, password).encode('ascii')
	base64_bytes = base64.b64encode(message_bytes)
	return base64_bytes.decode('ascii')