Skip to content

Instantly share code, notes, and snippets.

View taytus's full-sized avatar

Roberto Inetti taytus

View GitHub Profile
@taytus
taytus / password_hashing.php
Created January 17, 2012 18:56
Password Hashing with Codeigniter
function new_registration($username, $email, $password, $confirmation_code)
{
// Store the new user's information in the database.
$key = $this->config->item('encryption_key');
$salt1 = hash('sha512', $key . $password);
$salt2 = hash('sha512', $password . $key);
$hashed_password = hash('sha512', $salt1 . $password . $salt2);
@taytus
taytus / Timer.php
Created December 22, 2011 17:04 — forked from foowie/Timer.php
Class for time measuring
<?php
/**
* @author Daniel Robenek
* @license MIT
* @since 2011
*/
namespace Debug;