Source for file Encrypt.class.php
Documentation is available at Encrypt.class.php
* Gumbo Library Framework
* This library is being released under the terms of the New BSD License. A
* copy of the license is packaged with the software (LICENSE.txt). If no
* copy is found, a copy of the license template can be found at:
* http://www.opensource.org/licenses/bsd-license.php
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
gumbo_load ("Encryption");
public function __construct ($data=
null, $key=
null, $cipher=
null, $mode=
null, $encode=
null) {
* Parses the data by encryption
* @throws Gumbo_Exception
public function parse () {
for ($x =
0;$x <
$iv_size;$x++
) { $iv .=
"a"; }
for ($x =
0;$x <
strlen ($data);$x++
) {
if (strlen ($tmp) ==
1) { $tmp =
"0" .
$tmp; }
$e->setFunction (__METHOD__
);
* Returns an md5 encrypted string
* @param bool $raw_output parameter in the md5 function
* @throws Gumbo_Exception
public function md5 ($data=
null, $raw_output=
false) {
$e->setFunction (__METHOD__
);
return md5 ($data, $raw_output);
$e->setFunction (__METHOD__
);
* Returns an sha1 encrypted string
* @param bool $raw_output parameter in the md5 function
* @throws Gumbo_Exception
public function sha1 ($data=
null, $raw_output=
false) {
$e->setFunction (__METHOD__
);
return sha1 ($data, $raw_output);
$e->setFunction (__METHOD__
);