<?php

namespace MotaRaido\Core\Database;

if (!defined('MOTAFW')) 
{
    echo 'This file can only be called via the main index.php file, and not directly';
    exit();
}

use \MotaRaido\Core\Config;

class Encryption
{
	public static function encrypt($password)
	{
		$hash = password_hash($password . Config::get('secret-key'), PASSWORD_DEFAULT);
		return base64_encode($hash);
	}

	public static function verify($password, $text)
	{
		return password_verify($password . Config::get('secret-key'), base64_decode($text));
	}
}