raw($messageText, function ($message) use ($recipients,$title) { $message->subject($title); $message->to($recipients); }); // return $this->successResponse("mail envoye"); } public function checkPassword($password , $encrypted_password , $salt) { $encrypted_password_to_check = base64_encode(sha1($password . $salt, true) . $salt); return $encrypted_password_to_check == $encrypted_password; } public function hashSSHA($string) { $salt = sha1(rand()); $salt = substr($salt, 0, 10); $encrypted = base64_encode(sha1($string . $salt, true) . $salt); $hash = array("salt" => $salt, "encrypted" => $encrypted); return $hash; } }