Source for file password.php

Documentation is available at password.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Crypt
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Joomla Platform Password Hashing Interface
  14.  *
  15.  * @package     Joomla.Platform
  16.  * @subpackage  Crypt
  17.  * @since       12.2
  18.  */
  19. interface JCryptPassword
  20. {
  21.     const BLOWFISH '$2y$';
  22.  
  23.     const JOOMLA 'Joomla';
  24.  
  25.     const PBKDF '$pbkdf$';
  26.  
  27.     const MD5 '$1$';
  28.  
  29.     /**
  30.      * Creates a password hash
  31.      *
  32.      * @param   string  $password  The password to hash.
  33.      * @param   string  $type      The type of hash. This determines the prefix of the hashing function.
  34.      *
  35.      * @return  string  The hashed password.
  36.      *
  37.      * @since   12.2
  38.      */
  39.     public function create($password$type null);
  40.  
  41.     /**
  42.      * Verifies a password hash
  43.      *
  44.      * @param   string  $password  The password to verify.
  45.      * @param   string  $hash      The password hash to check.
  46.      *
  47.      * @return  boolean  True if the password is valid, false otherwise.
  48.      *
  49.      * @since   12.2
  50.      */
  51.     public function verify($password$hash);
  52.  
  53.     /**
  54.      * Sets a default prefix
  55.      *
  56.      * @param   string  $type  The prefix to set as default
  57.      *
  58.      * @return  void 
  59.      *
  60.      * @since   12.3
  61.      */
  62.     public function setDefaultType($type);
  63.  
  64.     /**
  65.      * Gets the default type
  66.      *
  67.      * @return  void 
  68.      *
  69.      * @since   12.3
  70.      */
  71.     public function getDefaultType();
  72. }

Documentation generated on Tue, 19 Nov 2013 15:10:18 +0100 by phpDocumentor 1.4.3