Ticket #1217: xtc_encrypt_password.inc.php

File xtc_encrypt_password.inc.php, 1.2 KB (added by Volker Strähle, 9 years ago)
Line 
1<?php
2/* -----------------------------------------------------------------------------------------
3 $Id$
4
5 modified eCommerce Shopsoftware
6 http://www.modified-shop.org
7
8 Copyright (c) 2009 - 2013 [www.modified-shop.org]
9 -----------------------------------------------------------------------------------------
10 based on:
11 (c) 2000-2001 The Exchange Project (earlier name of osCommerce)
12 (c) 2002-2003 osCommerce(password_funcs.php,v 1.10 2003/02/11); www.oscommerce.com
13 (c) 2003 nextcommerce (xtc_encrypt_password.inc.php,v 1.4 2003/08/13); www.nextcommerce.org
14 (c) 2003 XT-Commerce
15
16 Released under the GNU General Public License
17 ---------------------------------------------------------------------------------------*/
18
19 // include needed class
20 require_once (DIR_FS_CATALOG.'includes/classes/validpass.php');
21
22 // This function makes a new password from a plaintext password.
23function xtc_encrypt_password($plain, $iterationCountLog2=10, $portableHashes=false, $cryptType = '$2a$') {
24
25 // init class
26 $validpass = new validpass($iterationCountLog2, $portableHashes, $cryptType);
27 // encrypt password
28 $encrypted = $validpass->encrypt_password($plain);
29
30 return $encrypted;
31 }
32?>