Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7625191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:09:32+00:00 2026-05-31T05:09:32+00:00

I have a controller: landingpage.php <?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script access

  • 0

I have a controller: landingpage.php

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class LandingPage extends CI_Controller {

    public function index(){
          $data = array(
            'head' => $this->load->view('Landing_Header', '', true),
            'guts' => $this->load->view('Landing_Guts', '', true),
            'foot' => $this->load->view('Landing_Footer', '', true)
          );
          $this->load->view('index', $data);
    }

    public function validateInput(){
        #load help libraries for use
        $this->load->helper("form");
        $this->load->helper("form_validation");

        /////////////////////////////////////////////////////////////////
        /////////////////////// New User Validation /////////////////////
        /////////////////////// Format for Validation :  ////////////////
        ////////// "field name","Error Value","validation method" ///////
        $this->form_validation->set_rules('fullname','Your Name','required|min_length[2]|max_length[20]');
        $this->form_validation->set_rules('email','Your Email','required|valid_email|is_unique[users.email]');
        $this->form_validation->set_rules('emailConf','Email Confirm','required|matches[email]');
        $this->form_validation->set_rules('password','Password','required|min_length[2]|max_length[20]');
    }
}

I wondered how I can implement SHA 512 hashing like I had before when I was doing my app procedurally, exept this time in CODEIGNITER??

isset($_POST['password'])
$dynamSalt = mt_rand(20,100); 
$userPassword = hash('sha512',$dynamSalt.$userPassword);

Does code igniter have a built in function for this??? or something similar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:09:33+00:00Added an answer on May 31, 2026 at 5:09 am

    Does code igniter have a built in function for this?

    No, but since PHP does – you don’t need one.

    hash('sha512', $string);
    

    It can’t get much easier or shorter than that. Why rewrite existing functionality?

    However, for hashing passwords in PHP I suggest phpass:

    http://www.openwall.com/phpass/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a controller called landingpage.php <?php if ( ! defined('BASEPATH')) exit('No direct script
i have controller class UserController (in controller folder) which extends BaseController (present in app
I have controller and it has following code: class Company_ModuleName_NameController extends Mage_Core_Controller_Front_Action { public
I have a controller with an action method as follows: public class InventoryController :
I have a controller defined as: [AcceptVerbs(HttpVerbs.Post)] public JsonResult PostMoreData(DataContracts.Address address, DataContracts.GeoLocation geoLocation) {
I have controller which extends Controller_Template , and also i have quite few functions
I have controller with name AdminController where i have method create_school_head : class AdminsController
I have controller: package plugin class TestController { def simply = {[name:new Date()]} }
I have controller: class AccountController < ApplicationController def index end private def current_account @current_account
Suppose I have defined route like that, context.MapRoute( Preview, /preview/{id}/{type}, new { controller =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.