100+ results for 'php base64_encode'

Not the results you expected?

SessionTest.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 242 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

23 * @subpackage unit_tests

24 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

25 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

26 */

27

28 class Mage_Core_Model_Resource_SessionTest extends PHPUnit_Framework_TestCase

29 {

30 /**

class-waf-transforms.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 342 lines

1 <?php

2 /**

3 * Transforms for Jetpack Waf

78 * @return string

79 */

80 public function base64_encode( $value ) {

81 return base64_encode( $value );

Rsa.php (https://bitbucket.org/areeves42/openfisma.git) PHP · 324 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Crypt_Rsa_Key_Private

25 */

26 // require_once 'Zend/Crypt/Rsa/Key/Private.php';

27

28 /**

29 * @see Zend_Crypt_Rsa_Key_Public

30 */

31 // require_once 'Zend/Crypt/Rsa/Key/Public.php';

32

33 /**

71 {

72 if (!extension_loaded('openssl')) {

73 // require_once 'Zend/Crypt/Rsa/Exception.php';

74 throw new Zend_Crypt_Rsa_Exception('Zend_Crypt_Rsa requires openssl extention to be loaded.');

75 }

tasks.php (https://github.com/projectfork/Projectfork.git) PHP · 195 lines

1 <?php

2 /**

3 * @package Projectfork

73 // Storage failed.

74 $message = JText::sprintf('COM_PROJECTFORK_ERROR_SAVEPRIORITY_FAILED', $model->getError());

75 $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false), $message, 'error');

76 return false;

77 }

79 // Storage succeeded.

80 $message = JText::_('COM_PROJECTFORK_SUCCESS_TASK_SAVEPRIORITY');

81 $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false), $message);

82 return true;

83 }

105 // Assigning failed.

106 $message = JText::sprintf('COM_PROJECTFORK_ERROR_ADDUSER_FAILED', $model->getError());

107 $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false), $message, 'error');

108 return false;

109 }

shopcar.class.php (https://github.com/musicpop/cms.git) PHP · 260 lines

1 <?php

2 define("DE_ItemEcode",'Shop_De_');//ʶ±ð¹ºÎï³µCookieǰ׺,·Ç¿ª·¢ÈËÔ±Çë²»ÒªËæÒâ¸ü¸Ä!

3 /**

4 * ¹ºÎï³µÀà

5 *

6 * @version $Id: shopcar.class.php 2 20:58 2010��7��7��Z tianya $

7 * @package DedeCMS.Libraries

8 * @copyright Copyright (c) 2007 - 2010, DesDev, Inc.

195 $tmp .= $encrypt_key[$ctr].($txt[$i] ^ $encrypt_key[$ctr++]);

196 }

197 return base64_encode($this->setKey($tmp));

198 }

199

mail.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 406 lines

1 <?php

2 class Mail {

3 protected $to;

91

92 $header .= 'Date: ' . date('D, d M Y H:i:s O') . $this->newline;

93 $header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;

94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;

95 $header .= 'Return-Path: ' . $this->from . $this->newline;

96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;

97 //$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

98 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

136 $message .= 'Content-ID: <' . basename(urlencode($attachment)) . '>' . $this->newline;

137 $message .= 'X-Attachment-Id: ' . basename(urlencode($attachment)) . $this->newline . $this->newline;

138 $message .= chunk_split(base64_encode($content));

139 }

140 }

localization.php (https://github.com/foxluck/otdelstroy.git) PHP · 202 lines

1 <?php

2 /*

3 $init_required = false;

4 require_once( "../../../common/html/includes/httpinit.php" );

5

6 require_once( WBS_DIR."/published/wbsadmin/wbsadmin.php" );

117 foreach( $groups as $key=>$value )

118 {

119 $type_ids[] = base64_encode($value);

120 $type_names[] = $value;

121 }

152 /*extract(wbs_getSystemStatistics());

153

154 $preproc = new php_preprocessor( $templateName, $kernelStrings, $language, "wbsadmin" );

155

156 $preproc->assign( 'systemConfiguration', $systemConfiguration );

sessions.php (https://github.com/ZenMagick/zc-base.git) PHP · 211 lines

1 <?php

2 /**

3 * functions/sessions.php

8 * @copyright Portions Copyright 2003 osCommerce

9 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

10 * @version $Id: sessions.php 16745 2010-06-17 12:02:17Z wilt $

11 */

12 if (!defined('IS_ADMIN_FLAG')) {

52 global $db;

53 if (!is_object($db)) {

54 //PHP 5.2.0 bug workaround ...

55 $db = new queryFactory();

56 $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);

57 }

58 $val = base64_encode($val);

59

60 global $SESS_LIFE;

google.php (https://gitlab.com/Ltaimao/wecenter) PHP · 210 lines

1 <?php

2 /*

3 +--------------------------------------------------------------------------

136 if ($state['return_url'])

137 {

138 $redirect_url .= 'url-' . base64_encode($state['return_url']);

139 }

140 }

hash.js (https://github.com/rgranadino/magento-mirror.git) JavaScript · 162 lines

7 * that is bundled with this package in the file LICENSE_AFL.txt.

8 * It is also available through the world-wide-web at this URL:

9 * http://opensource.org/licenses/afl-3.0.php

10 * If you did not receive a copy of the license and are unable to

11 * obtain it through the world-wide-web, please send an email

21 * @package Mage_Adminhtml

22 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

23 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

24 */

25 /*

57 function encode_base64( what )

58 {

59 var base64_encodetable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

60 var result = "";

61 var len = what.length;

exhibit.php (https://github.com/eob/datapress-old.git) PHP · 198 lines

1 <?php

2 require_once('db-methods.php');

117 function getStatisticReport($currentView, $postid) {

118 // $postid = $wpdb->get_var("SELECT postid FROM $table WHERE exhibitid=$exhibitid ;");

119 $permalink = base64_encode(get_permalink($postid));

120 $viewState = base64_encode($this->get('lightbox') ? "lightbox" : "inline");

121 $postType = base64_encode(get_post($postid)->post_type);

122 $currentView = base64_encode($currentView);

134 // Do an insert

135 $sql = "INSERT INTO $table (id, exhibit_config, version) VALUES (%d, %s, %d);";

136 $sql = $wpdb->prepare($sql, $this->dbfields['id'], base64_encode($this->dbfields['exhibit_config']), $this->dbfields['version']);

137 } else {

138 // Do an update

139 $sql = "UPDATE $table SET exhibit_config=%s, version=%d WHERE id=%d";

140 $sql = $wpdb->prepare($sql, base64_encode($this->dbfields['exhibit_config']), $this->dbfields['version'], $this->dbfields['id']);

141 }

142

addmedia.php (https://gitlab.com/ppapadatis/Videolearn) PHP · 188 lines

1 <?php

2 /**

3 * @version SVN $Id: addmedia.php 1014 2013-01-30 14:36:00Z dhorsfall $

56 else

57 {

58 JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_HWDMS_SUCCESSFULLY_UPLOADED_X', $model->_title).' (<a href="index.php?option=com_hwdmediashare&task=mediaform.edit&id='.$model->_id.'&return='.base64_encode(hwdMediaShareHelperRoute::getMediaItemRoute($model->_id)).'">'.JText::_('COM_HWDMS_EDIT_MEDIA').'</a>)');

59 $this->setRedirect(hwdMediaShareHelperRoute::getMediaItemRoute($model->_id));

60 }

101 if ($user->id)

102 {

103 JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_HWDMS_SUCCESSFULLY_UPLOADED_X', $model->_title).' (<a href="index.php?option=com_hwdmediashare&task=mediaform.edit&id='.$model->_id.'">'.JText::_('COM_HWDMS_EDIT_MEDIA').'</a>)');

104 $this->setRedirect(hwdMediaShareHelperRoute::getMyMediaRoute());

105 }

145 else

146 {

147 JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_HWDMS_SUCCESSFULLY_ADDED_X', $model->_title).' (<a href="index.php?option=com_hwdmediashare&task=mediaform.edit&id='.$model->_id.'&return='.base64_encode(hwdMediaShareHelperRoute::getMediaItemRoute($model->_id)).'">'.JText::_('COM_HWDMS_EDIT_MEDIA').'</a>)');

148 $this->setRedirect(hwdMediaShareHelperRoute::getMediaItemRoute($model->_id));

149 }

function.fetch.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 216 lines

1 <?php

2 /**

3 * Smarty plugin

13 * Name: fetch<br>

14 * Purpose: fetch file, web or ftp data and display results

15 * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}

16 * (Smarty online manual)

17 * @author Monte Ohrt <monte at ohrt dot com>

171 }

172 if(!empty($user) && !empty($pass)) {

173 fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");

174 }

175

hash.js (https://github.com/gryzz/crystal_magento.git) JavaScript · 162 lines

7 * that is bundled with this package in the file LICENSE_AFL.txt.

8 * It is also available through the world-wide-web at this URL:

9 * http://opensource.org/licenses/afl-3.0.php

10 * If you did not receive a copy of the license and are unable to

11 * obtain it through the world-wide-web, please send an email

21 * @package Mage_Adminhtml

22 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)

23 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

24 */

25 /*

57 function encode_base64( what )

58 {

59 var base64_encodetable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

60 var result = "";

61 var len = what.length;

hash.js (https://gitlab.com/LisovyiEvhenii/tasks) JavaScript · 162 lines

7 * that is bundled with this package in the file LICENSE_AFL.txt.

8 * It is also available through the world-wide-web at this URL:

9 * http://opensource.org/licenses/afl-3.0.php

10 * If you did not receive a copy of the license and are unable to

11 * obtain it through the world-wide-web, please send an email

21 * @package Mage_Adminhtml

22 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)

23 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

24 */

25 /*

57 function encode_base64( what )

58 {

59 var base64_encodetable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

60 var result = "";

61 var len = what.length;

hash.js (https://bitbucket.org/chung/buyforher.git) JavaScript · 162 lines

7 * that is bundled with this package in the file LICENSE_AFL.txt.

8 * It is also available through the world-wide-web at this URL:

9 * http://opensource.org/licenses/afl-3.0.php

10 * If you did not receive a copy of the license and are unable to

11 * obtain it through the world-wide-web, please send an email

21 * @package Mage_Adminhtml

22 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)

23 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

24 */

25 /*

57 function encode_base64( what )

58 {

59 var base64_encodetable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

60 var result = "";

61 var len = what.length;

crypt.html (https://github.com/rclanan/docs.git) HTML · 186 lines

30 The Crypt class allows encrypt or decrypt a string. The Crypt class is also used internally by for example the Fuel Sessions class.

31 </p>

32 <p>It uses the encryption and hashing methods provided by PHPSecLib, so it's not dependent on external modules being available, such as mcrypt.</p>

33

34 <section>

36

37 <p>

38 The Crypt class is configured through the <kbd>app/config/crypt.php</kbd> configuration file. It will be generated and populated with random values when you first use the Crypt class or if one of the required configuration values is missing.

39 </p>

40 <p class="note">

41 Note that this will require write access to app/config/crypt.php! If this is not possible, make sure all configuration settings are set!

42 </p>

43 <p>The following configuration settings can be defined:</p>

S3_policy.php (https://github.com/cloister/DIY.git) PHP · 303 lines

1 <?php

2 /**

3 * @category Amazon

233 return $policy;

234 } else {

235 return base64_encode(utf8_encode(preg_replace('/\s\s+|\\f|\\n|\\r|\\t|\\v/', '', $policy)));

236 }

237 }

244 */

245 public function getSignedPolicy() {

246 return base64_encode(hash_hmac('sha1', $this->getPolicy(true), $this->_awsSecretAccessKey, true));

247 }

248

Utils.php (https://github.com/markn86/moodle.git) PHP · 133 lines

1 <?php

2 /*

3 * Copyright 2011 Google Inc.

24 public static function urlSafeB64Encode($data)

25 {

26 $b64 = base64_encode($data);

27 $b64 = str_replace(

28 array('+', '/', '\r', '\n', '='),

54 * @link http://solarphp.com/

55 * @link http://svn.solarphp.com/core/trunk/Solar/Json.php

56 * @link http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Json/Decoder.php

callback.php (https://bitbucket.org/ngmares/moodle.git) PHP · 81 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

24 */

25 require_once(dirname(dirname(dirname(__FILE__))).'/config.php');

26 $json = required_param('tlelinks', PARAM_RAW);

27

56 }

57

58 $source = base64_encode(serialize((object)array('url'=>$url,'filename'=>$filename)));

59

60 $js =<<<EOD

RedisStore.php (https://github.com/gimler/symfony.git) PHP · 160 lines

1 <?php

2

3 /*

152 {

153 if (!$key->hasState(__CLASS__)) {

154 $token = base64_encode(random_bytes(32));

155 $key->setState(__CLASS__, $token);

156 }

Image.php (https://github.com/unl/UNL_ENews.git) PHP · 197 lines

1 <?php

2 class UNL_ENews_File_Image extends UNL_ENews_File

3 {

134 function resizeImage($x1=0, $x2=0, $y1=0, $y2=0, $width, $height)

135 {

136 $file = 'data://'.$this->type.';base64,' . base64_encode($this->data);

137 list($current_width, $current_height) = getimagesize($file);

138 // This will be the final size of the cropped image

192 function getSize()

193 {

194 $file = 'data://'.$this->type.';base64,' . base64_encode($this->data);

195 return getimagesize($file);

196 }

downloads-list.php (https://gitlab.com/Fraternal-Group/fraternal) PHP · 85 lines

33 );

34 ?>

35 <input type="checkbox" name="downloads[]" value="<?php echo base64_encode(json_encode($download_data)); ?>" <?php

36 if($this->plugin_is_installed($download['name'], $download['slug'], $download['version']) && !$this->plugin_is_embedded_version($download['name'], $download['slug']) || WP_Installer()->dependencies->cant_download($repository_id) ): ?>disabled="disabled"<?php endif; ?> />&nbsp;

45 <span class="<?php echo $class ?>"><?php echo $v; ?></span>

46 <?php if($this->plugin_is_embedded_version($download['name'], $download['slug'])): ?>&nbsp;<?php _e('(embedded)', 'installer'); ?><?php endif; ?>

47 <?php endif; ?>

48 </td>

49 <td>

50 <span class="installer-status-installing"><?php _e('installing...', 'installer') ?></span>

51 <span class="installer-status-updating"><?php _e('updating...', 'installer') ?></span>

52 <span class="installer-status-installed" data-fail="<?php _e('failed!', 'installer') ?>"><?php _e('installed', 'installer') ?></span>

53 <span class="installer-status-updated" data-fail="<?php _e('failed!', 'installer') ?>"><?php _e('updated', 'installer') ?></span>

54 </td>

55 <td>

index.php (https://bitbucket.org/mkjinesh/pcs.git) PHP · 57 lines

1 <?php

2 error_reporting(0);

3 define('ok',1);

4 $page = "home.php";

5 mysql_connect("localhost", "root", "amma") or die('Error');

6 mysql_select_db("task");

11 echo '<h1>Wrong login or password!</h1>';

12 } else {

13 setcookie('auth', base64_encode($_POST['login'].'|'.$_POST['pwd']));

14 header("Location: ./index.php");

33

34

35 $whitelist = array('news.php', 'home.php', 'download.php','users.php');

36 if (isset($_GET['page'])) {

37 if (in_array($_GET['page'], $whitelist))

Encrypt.php (https://github.com/holsinger/openfloor.git) PHP · 397 lines

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

2 /**

3 * CodeIgniter

4 *

5 * An open source application development framework for PHP 4.3.2 or newer

6 *

7 * @package CodeIgniter

121 $enc = $this->mcrypt_encode($enc, $key);

122 }

123 return base64_encode($enc);

124 }

125

callback.php (https://github.com/raymanuk/moodle.git) PHP · 81 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

24 */

25 require_once(dirname(dirname(dirname(__FILE__))).'/config.php');

26 $json = required_param('tlelinks', PARAM_RAW);

27

56 }

57

58 $source = base64_encode(json_encode(array('url'=>$url,'filename'=>$filename)));

59

60 $js =<<<EOD

Attribute.php (https://bitbucket.org/juan_sanchez/aiyellow.git) PHP · 372 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

276 break;

277 }

278 return $method . base64_encode($rawHash);

279 }

280

PhabricatorFileStorageFormatTestCase.php (https://github.com/dannysu/phabricator.git) PHP · 77 lines

1 <?php

2

3 final class PhabricatorFileStorageFormatTestCase extends PhabricatorTestCase {

46 'name' => $key_name,

47 'type' => 'aes-256-cbc',

48 'material.base64' => base64_encode($key_text),

49 ));

50

Smtp.php (https://github.com/jyxo/php-no-namespace.git) PHP · 342 lines

1 <?php

2

3 /**

4 * Jyxo PHP Library

5 *

6 * LICENSE

9 * with this package in the file license.txt.

10 * It is also available through the world-wide-web at this URL:

11 * https://github.com/jyxo/php/blob/master/license.txt

12 */

13

20 * @subpackage Sender

21 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.

22 * @license https://github.com/jyxo/php/blob/master/license.txt

23 * @author Jaroslav Hanslík

24 */

JoomlatokenField.php (https://github.com/Hackwar/joomla-cms.git) PHP · 164 lines

1 <?php

2 /**

3 * @package Joomla.Plugin

121 $tokenHash = hash_hmac($algorithm, $rawToken, $siteSecret);

122 $userId = $this->form->getData()->get('id');

123 $message = base64_encode("$algorithm:$userId:$tokenHash");

124

125 if ($userId != Factory::getUser()->id)

CetakBarcode.php (https://gitlab.com/alfiantaufani/koperasi-tugas-kuliah) PHP · 59 lines

1 <?php

2 defined('BASEPATH') OR exit('No direct script access allowed');

3 class CetakBarcode extends CI_Controller {

26 public function details($id)

27 {

28 require 'vendor/autoload.php';

29 $generator = new Picqer\Barcode\BarcodeGeneratorPNG();

30 $height = 2;

37 <label style="font-size: 11px">'.$data->nama_produk.'</label>

38 <br>

39 <img src="data:image/png;base64,' . base64_encode($generator->getBarcode($data->barcode_sendiri, $generator::TYPE_CODE_128, $height, $width)) . '">

40 <br>

41 <label style="font-size: 11px; letter-spacing: 7px;">'.$data->barcode_sendiri.'</label>

Profiler.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 296 lines

1 <?php

2

3 /*

141 public function export(Profile $profile)

142 {

143 return base64_encode(serialize($profile));

144 }

145

176 * @return array An array of tokens

177 *

178 * @see http://php.net/manual/en/datetime.formats.php for the supported date/time formats

179 */

180 public function find($ip, $url, $limit, $method, $start, $end)

crypt.php (https://github.com/akutaktau/feedmalaya.git) PHP · 331 lines

1 <?php

2 /**

3 * Fuel

4 *

5 * Fuel is a fast, lightweight, community driven PHP5 framework.

6 *

7 * @package Fuel

10 * @license MIT License

11 * @copyright 2010 - 2011 Fuel Development Team

12 * @link http://fuelphp.com

13 */

14

22 * @category Core

23 * @author Harro "WanWizard" Verton

24 * @link http://fuelphp.com/docs/classes/crypt.html

25 */

26 class Crypt {

accounts.activation.php (https://gitlab.com/Nightprince/Warcry-CMS) PHP · 263 lines

1 <?php

2 if (!defined('init_engine'))

3 {

76 if ($this->key)

77 {

78 return base64_encode($this->key);

79 }

80 else

127 ** false - Returned when the function fails to load mail HTML

128 ** - Returned when the accounts query failed

129 ** - Returned when the PHPMailer class failed to send mail

130 ** --------------------------------------------------------------------------------------------

131 **/

134 global $config, $DB;

135

136 //setup the PHPMailer class

137 $mail = new PHPMailerLite();

offline.php (https://bitbucket.org/ghazalp/jsbootstrap.git) PHP · 84 lines

16 <?php // <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> ?>

17 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />

18 <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" media="screen" />

19

20 <?php // ==== Le HTML5 shim, for IE6-8 support of HTML5 elements ?>

28 <link rel="apple-touch-icon" sizes="114x114" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/img/ico/apple-touch-icon-114x114.png" />

29 <link rel="apple-touch-icon" sizes="72x72" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/img/ico/apple-touch-icon-72x72.png" />

30 <link rel="apple-touch-icon" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/img/ico/apple-touch-icon-57x57.png" />

51 <?php endif; ?>

52 <form action="<?php echo JRoute::_('index.php', true); ?>" method="post" name="login" id="form-login">

53 <fieldset class="input">

54 <p id="form-login-username">

71 <input type="hidden" name="option" value="com_users" />

72 <input type="hidden" name="task" value="user.login" />

73 <input type="hidden" name="return" value="<?php echo base64_encode(JURI::base()); ?>" />

74 <?php echo JHTML::_( 'form.token' ); ?>

member_connect_register.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 127 lines

1 <?php

2

3 /**

5 * This is NOT a freeware, use is subject to license terms

6 *

7 * $Id: member_connect_register.php 28644 2012-03-06 13:44:19Z houdelei $

8 */

9

95

96 dsetcookie('connect_js_name', 'user_bind', 86400);

97 dsetcookie('connect_js_params', base64_encode(serialize(array('type' => 'register'))), 86400);

98 dsetcookie('connect_login', 1, 31536000);

99 dsetcookie('connect_is_bind', '1', 31536000);

form.php (https://github.com/projectfork/Projectfork.git) PHP · 137 lines

1 <?php

2 /**

3 * @package Projectfork

13

14 // Base this model on the backend version.

15 JLoader::register('PFcommentsModelComment', JPATH_ADMINISTRATOR . '/components/com_pfcomments/models/comment.php');

16

17

110 public function getReturnPage()

111 {

112 return base64_encode($this->getState('return_page'));

113 }

114

Template.php (https://github.com/seloshow/Magento-Pruebas.git) PHP · 130 lines

1 <?php

2

3 /**

65

66 foreach ($emails as $key => $email) {

67 $mail->addTo($email, '=?utf-8?B?' . base64_encode($names[$key]) . '?=');

68 }

69

78 }

79

80 $mail->setSubject('=?utf-8?B?'.base64_encode($this->getProcessedTemplateSubject($variables)).'?=');

81 $mail->setFrom($this->getSenderEmail(), $this->getSenderName());

82

search.php (https://bitbucket.org/myockey/clearcreek-chapel-website.git) PHP · 151 lines

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

2 /**

3 * ExpressionEngine - by EllisLab

65 {

66 // Save the search

67 $search = rawurlencode(base64_encode($search));

68

69 if (AJAX_REQUEST)

148 }

149

150 /* End of file search.php */

151 /* Location: ./system/expressionengine/controllers/cp/search.php */

SiteController.php (https://gitlab.com/irvanresna/sensasi) PHP · 168 lines

1 <?php

2

3 class SiteController extends Controller

15 ),

16 // page action renders "static" pages stored under 'protected/views/site/pages'

17 // They can be accessed via: index.php?r=site/page&view=FileName

18 'page'=>array(

19 'class'=>'CViewAction',

28 public function actionIndex()

29 {

30 // renders the view file 'protected/views/site/index.php'

31 // using the default layout 'protected/views/layouts/main.php'

36 {

37

38 // renders the view file 'protected/views/site/index.php'

39 // using the default layout 'protected/views/layouts/main.php'

securesettings.php (https://github.com/CCI-Studios/Wee-Magazine.git) PHP · 144 lines

1 <?php

2 /**

3 * @package AkeebaBackup

26 if(defined('AKEEBA_SERVERKEY')) return base64_decode(AKEEBA_SERVERKEY);

27

28 $filename = dirname(__FILE__).'/../serverkey.php';

29 if(file_exists($filename)) {

30 include_once $filename;

42 public static function supportsEncryption()

43 {

44 // Do we have the encypt.php plugin?

45 $filename = dirname(__FILE__).'/../utils/encrypt.php';

50 if($useEncryption == 0) return false;

51

52 // Do we have base64_encode/_decode required for encryption?

53 if(!function_exists('base64_encode') || !function_exists('base64_decode')) return false;

Embed.php (https://github.com/mathiasrw/Scaffold.git) PHP · 95 lines

1 <?php

2 /**

3 * Scaffold_Extension_Embed

9 * @author Anthony Short <anthonyshort@me.com>

10 * @copyright 2009-2010 Anthony Short. All rights reserved.

11 * @license http://opensource.org/licenses/bsd-license.php New BSD License

12 * @link https://github.com/anthonyshort/csscaffold/master

13 */

60 if($data === false OR $mod_time > $data->last_modified)

61 {

62 $data = base64_encode(file_get_contents($path));

63 $scaffold->cache->set($id,$data,$mod_time,false);

64 }

User.class.php (https://github.com/jalleyne/inception.-.git) PHP · 278 lines

1 <?php

2 /**

3 * Copyright 2011 Jovan Alleyne <me@jalleyne.ca>.

44 $_SESSION['access_token'] =

45 $this->access_token = str_replace(' ','_',

46 base64_encode(md5($_SESSION['user'].microtime())).

47 microtime());

48 }

137 private function generatePasswordResetToken() {

138 if ($this->id && $this->username && $this->email)

139 return base64_encode(MD5($this->id . $this->username . $this->email) . $this->id) . '.' . microtime();

140 else

141 return null;

SubscribeRemoteCalendar.php (https://github.com/Excito/kronolith.git) PHP · 76 lines

1 <?php

2 /**

3 * Horde_Form for subscribing to remote calendars.

4 *

5 * $Horde: kronolith/lib/Forms/SubscribeRemoteCalendar.php,v 1.1.2.1 2007/12/20 14:12:36 jan Exp $

6 *

7 * See the enclosed file COPYING for license information (GPL). If you

12

13 /** Variables */

14 require_once 'Horde/Variables.php';

15

16 /** Horde_Form */

17 require_once 'Horde/Form.php';

18

19 /** Horde_Form_Renderer */

authentication.php (git://pkgs.fedoraproject.org/pgfouine) PHP · 219 lines

1 <?php

2 /**

3 * Base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage WebTester

6 * @version $Id: authentication.php,v 1.1 2005/11/09 23:41:18 gsmet Exp $

7 */

8 /**

9 * include http class

10 */

11 require_once(dirname(__FILE__) . '/http.php');

12

13 /**

213 if ($username && $password) {

214 $request->addHeaderLine(

215 'Authorization: Basic ' . base64_encode("$username:$password"));

216 }

217 }

index.php (https://github.com/zsalwen/Service-Office.git) PHP · 68 lines

51 echo '<param name="scriptable" value="true">';

52

53 if(isset($_SERVER['PHP_AUTH_USER']))

54 {

55 printf('<param name="chap" value="%s">',

56 base64_encode($_SERVER['PHP_AUTH_USER'].":".$_SERVER['PHP_AUTH_PW']));

57 }

58 if($useApplet == 1)

Encrypter.php (https://gitlab.com/nmhieucoder/laravel_tintuc) PHP · 240 lines

1 <?php

2

3 namespace Illuminate\Encryption;

97 }

98

99 // Once we get the encrypted value we'll go ahead and base64_encode the input

100 // vector and create the MAC for the encrypted value so we can then verify

101 // its authenticity. Then, we'll JSON the data into the "payload" array.

102 $mac = $this->hash($iv = base64_encode($iv), $value);

103

104 $json = json_encode(compact('iv', 'value', 'mac'), JSON_UNESCAPED_SLASHES);

108 }

109

110 return base64_encode($json);

111 }

112

data_collector.rst (https://github.com/sebio/symfony-docs.git) ReStructuredText · 169 lines

96 </service>

97

98 .. code-block:: php

99

100 $container

141 src="src="data:image/png;base64,..."``). You can easily calculate the

142 base64 value for an image with this little script: ``echo

143 base64_encode(file_get_contents($_SERVER['argv'][1]));``.

144

145 To enable the template, add a ``template`` attribute to the ``data_collector``

162 </service>

163

164 .. code-block:: php

165

166 $container

cookie.test.php (https://github.com/geeknbar/projet-tut-site-web.git) PHP · 438 lines

8 * PHP versions 4 and 5

9 *

10 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>

11 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

12 *

15 *

16 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

17 * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests

18 * @package cake

19 * @subpackage cake.tests.cases.libs.controller.components

234 $this->Controller->Cookie->destroy();

235

236 $this->Controller->Cookie->write(array('Encrytped_array' => array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' =>'CakePHP Rocks!')));

237 $this->Controller->Cookie->write(array('Encrytped_multi_cookies.name' => 'CakePHP'));

403

404 $data = $this->Controller->Cookie->read('Plain_multi_cookies');

405 $expected = array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' =>'CakePHP Rocks!');

406 $this->assertEqual($data, $expected);

407 $this->Controller->Cookie->destroy();

database.php (https://gitlab.com/seckmaster/Cloud-password) PHP · 146 lines

1 <?php

2 $host = "localhost"; // Host name

3 $username = "toni"; // Mysql username

25 }

26

27 // encrypts string (source: http://alias.io/2010/01/store-passwords-safely-with-php-and-mysql/)

28 function _Crypt($string) {

29 $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.');

43 if($password == $hash) {

44 $_SESSION["user"] = $username;

45 header("Location: ../user/index.php");

46 exit();

47 }

actions.class.php (https://github.com/sanjuro/Meteb.git) PHP · 142 lines

1 <?php

2

3 /**

98

99 // $newQuoteResponseObj = new newQuoteResponse();

100 $newQuoteResponseString = base64_encode($metebPDF->output_html());

101

102 $this->result = $newQuoteResponseString;

news.class.php (https://github.com/iconifyit/SkyBlue-1.1.git) PHP · 152 lines

1 <?php

2

3 /**

44 $this->SaveStoryText();

45

46 $_POST['intro'] = base64_encode(stripslashes(urldecode($_POST['intro'])));

47 $_POST['text'] = base64_encode(stripslashes(urldecode($_POST['text'])));

105 stripslashes(urldecode($_POST['text'])));

106 $_POST['text'] =

107 base64_encode(stripslashes(urldecode($_POST['text'])));

108 }

109

MessageDataCollector.php (https://github.com/symfony/SwiftmailerBundle.git) PHP · 193 lines

1 <?php

2

3 /*

62 foreach ($logger->getMessages() as $message) {

63 $message->__contentType = $message->getBodyContentType();

64 $message->__base64EncodedBody = base64_encode($message->getBody());

65 if ('text/plain' === $message->__contentType) {

66 foreach ($message->getChildren() as $child) {

67 if ('text/html' === $child->getContentType()) {

68 $message->__contentType = 'text/html';

69 $message->__base64EncodedBody = base64_encode($child->getBody());

70 break;

71 }

class-wp-importer.php (https://gitlab.com/morganestes/wordpress-develop) PHP · 333 lines

1 <?php

2 /**

3 * WP_Importer base class

212 }

213 if ( ! empty( $username ) && ! empty( $password ) ) {

214 $headers['Authorization'] = 'Basic ' . base64_encode( "$username:$password" );

215 }

216

Plain.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 96 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Plain.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $

21 */

22

25 * @see Zend_Mail_Protocol_Smtp

26 */

27 require_once 'Zend/Mail/Protocol/Smtp.php';

28

29

90 $this->_send('AUTH PLAIN');

91 $this->_expect(334);

92 $this->_send(base64_encode(chr(0) . $this->_username . chr(0) . $this->_password));

93 $this->_expect(235);

94 $this->_auth = true;

helper.php (https://github.com/dextercowley/joomla-cms.git) PHP · 122 lines

1 <?php

2 /**

3 * @package Joomla.Site

49 if ($router->getMode() == JROUTER_MODE_SEF)

50 {

51 $url = 'index.php?Itemid=' . $itemid;

52 }

53 else

76 if (isset($item) && $vars == $item->query)

77 {

78 $url = 'index.php?Itemid=' . $itemid;

79 }

80 else

81 {

82 $url = 'index.php?' . JUri::buildQuery($vars) . '&Itemid=' . $itemid;

83 }

84 }

soapcodec.php (https://github.com/agratushniy/bxApiDocs.git) PHP · 351 lines

1 <?php

2

3 class CSOAPCodec

50 public static function _validateClassType($classType, $value)

51 {

52 $phpClassType = strtolower($classType);

53 $phpValue = strtolower(get_class($value));

54 if ($phpClassType != $phpValue)

55 {

56 CSOAPServer::ShowSOAPFault("_errorTypeValidation(): Type validation for func. failed: {$classType} != ".get_class($value));

99 }

100

101 // Encodes a PHP variable into a SOAP datatype.

102 public function encodeValue($name, $value, $complexDataTypeName = "")

103 {

ServerTest.php (https://bitbucket.org/RedSerenityDev/serenitybilling.git) PHP · 298 lines

1 <?php

2

3 /**

273 $data['version'] = '0.0.2';

274

275 $k = base64_encode(json_encode($data));

276 $url = 'http://www.box.local/licenses';

277 $params = 'key='.$k;

Plain.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 97 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Plain.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

25 * @see Zend_Mail_Protocol_Smtp

26 */

27 require_once 'Zend/Mail/Protocol/Smtp.php';

28

29

91 $this->_send('AUTH PLAIN');

92 $this->_expect(334);

93 $this->_send(base64_encode("\0" . $this->_username . "\0" . $this->_password));

94 $this->_expect(235);

95 $this->_auth = true;

Base.php (https://github.com/imr/horde.git) PHP · 87 lines

1 <?php

2 /**

3 * Handles a active sync parameters.

4 *

5 * PHP version 5

6 *

7 * @category Kolab

9 * @author Gunnar Wrobel <wrobel@pardus.de>

10 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

11 * @link http://pear.horde.org/index.php?package=Kolab_Storage

12 */

13

24 * @author Gunnar Wrobel <wrobel@pardus.de>

25 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

26 * @link http://pear.horde.org/index.php?package=Kolab_Storage

27 */

28 class Horde_Kolab_Storage_List_Query_ActiveSync_Base

SessionHandler.php (https://github.com/kiranatama/sagalaya.git) PHP · 189 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

44 * @param string $sessionTablePartition Session table partition

45 */

46 public function __construct(Storage\Table $tableStorage, $sessionTable = 'phpsessions',

47 $sessionTablePartition = 'sessions')

48 {

54

55 /**

56 * Registers the current session handler as PHP's session handler

57 *

58 * @return boolean

121 *

122 * @param int $id Session Id

123 * @param string $serializedData Serialized PHP object

124 */

125 public function write($id, $serializedData)

view.html.php (https://bitbucket.org/ke2083/transfans.co.uk-website.git) PHP · 109 lines

1 <?php

2 /**

3 * @package Joomla.Administrator

59 $this->activeFilters = $this->get('ActiveFilters');

60 $this->preview = JComponentHelper::getParams('com_templates')->get('template_positions_display');

61 $this->file = base64_encode('home');

62

63 TemplatesHelper::addSubmenu('templates');

103 JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES');

104

105 JHtmlSidebar::setAction('index.php?option=com_templates&view=templates');

106

107 $this->sidebar = JHtmlSidebar::render();

JoomlaStorage.php (https://github.com/Hackwar/joomla-cms.git) PHP · 313 lines

1 <?php

2 /**

3 * Joomla! Content Management System

131 {

132 // Before storing data to the session, we serialize and encode the Registry

133 $_SESSION['joomla'] = base64_encode(serialize(clone $this->data));

134

135 parent::close();

265 * @return $this

266 *

267 * @see http://php.net/session.configuration

268 * @since 4.0.0

269 */

BinaryType.php (https://gitlab.com/ViniciusP/project-games) PHP · 82 lines

1 <?php

2 /**

3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

5 *

9 *

10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

11 * @link http://cakephp.org CakePHP(tm) Project

12 * @since 3.0.0

13 * @license http://www.opensource.org/licenses/mit-license.php MIT License

24 * Binary type converter.

25 *

26 * Use to convert binary data between PHP and the database types.

27 */

28 class BinaryType extends Type

hash.js (https://github.com/jpratt/cal.git) JavaScript · 160 lines

7 * that is bundled with this package in the file LICENSE_AFL.txt.

8 * It is also available through the world-wide-web at this URL:

9 * http://opensource.org/licenses/afl-3.0.php

10 * If you did not receive a copy of the license and are unable to

11 * obtain it through the world-wide-web, please send an email

19 *

20 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)

21 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

22 */

23 /*

55 function encode_base64( what )

56 {

57 var base64_encodetable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

58 var result = "";

59 var len = what.length;

SharedKeyLite.php (https://github.com/grjones/qframe.git) PHP · 166 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

24 */

25 require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';

26

27 /**

28 * @see Zend_Service_WindowsAzure_Storage

29 */

30 require_once 'Zend/Service/WindowsAzure/Storage.php';

31

32 /**

33 * @see Zend_Service_WindowsAzure_Credentials_SharedKey

34 */

35 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKey.php';

36

37 /**

elFinderSession.php (https://gitlab.com/itlboy/yii2-starter-installed) PHP · 237 lines

1 <?php

2

3 /**

39 public function start()

40 {

41 if (version_compare(PHP_VERSION, '5.4.0', '>=')) {

42 if (session_status() !== PHP_SESSION_ACTIVE) {

213 {

214 if ($this->base64encode) {

215 $data = base64_encode(serialize($data));

216 }

217 return $data;

hash.js (https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess) JavaScript · 162 lines

7 * that is bundled with this package in the file LICENSE_AFL.txt.

8 * It is also available through the world-wide-web at this URL:

9 * http://opensource.org/licenses/afl-3.0.php

10 * If you did not receive a copy of the license and are unable to

11 * obtain it through the world-wide-web, please send an email

21 * @package Mage_Adminhtml

22 * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)

23 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

24 */

25 /*

57 function encode_base64( what )

58 {

59 var base64_encodetable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

60 var result = "";

61 var len = what.length;

WebSocketProtocolV8.php (https://github.com/Erika31/phpdaemon.git) PHP · 184 lines

1 <?php

2

3 /**

49 . "Sec-WebSocket-Origin: " . $this->session->server['HTTP_SEC_WEBSOCKET_ORIGIN'] . "\r\n"

50 . "Sec-WebSocket-Location: ws://" . $this->session->server['HTTP_HOST'] . $this->session->server['REQUEST_URI'] . "\r\n"

51 . "Sec-WebSocket-Accept: " . base64_encode(sha1(trim($this->session->server['HTTP_SEC_WEBSOCKET_KEY']) . "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", true)) . "\r\n" ;

52

53 if (isset($this->session->server['HTTP_SEC_WEBSOCKET_PROTOCOL']))

Encrypter.php (https://gitlab.com/techniconline/kmc) PHP · 302 lines

1 <?php namespace Illuminate\Encryption;

2

3 use Exception;

59 $iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer());

60

61 $value = base64_encode($this->padAndMcrypt($value, $iv));

62

63 // Once we have the encrypted value we will go ahead base64_encode the input

64 // vector and create the MAC for the encrypted value so we can verify its

65 // authenticity. Then, we'll JSON encode the data in a "payload" array.

66 $mac = $this->hash($iv = base64_encode($iv), $value);

67

68 return base64_encode(json_encode(compact('iv', 'value', 'mac')));

RememberMe.php (https://github.com/psecio/gatekeeper.git) PHP · 266 lines

1 <?php

2

3 namespace Psecio\Gatekeeper\Session;

243 $generator = $factory->getMediumStrengthGenerator();

244

245 return base64_encode($generator->generate(24));

246 }

247

function.fetch.php (https://github.com/exponentcms/exponent-cms.git) PHP · 204 lines

1 <?php

2 /**

3 * Smarty plugin

12 * Purpose: fetch file, web or ftp data and display results

13 *

14 * @link https://www.smarty.net/manual/en/language.function.fetch.php {fetch}

15 * (Smarty online manual)

16 * @author Monte Ohrt <monte at ohrt dot com>

38 if (isset($template->smarty->security_policy)) {

39 if ($protocol) {

40 // remote resource (or php stream, …)

41 if (!$template->smarty->security_policy->isTrustedUri($params[ 'file' ])) {

42 return;

174 }

175 if (!empty($user) && !empty($pass)) {

176 fputs($fp, 'Authorization: BASIC ' . base64_encode("$user:$pass") . "\r\n");

177 }

178 fputs($fp, "\r\n");

index.php (https://github.com/jingcleovil/Flux-Mod-Full.git) PHP · 132 lines

21 <tr>

22 <th>Schema Type</th>

23 <td><?php echo $permissionError->isLoginDbSchema() ? 'Login Server Database' : 'Char/Map Server Database' ?></td>

24 </tr>

25 <tr>

65 <?php foreach ($installer->servers as $mainServerName => $mainServer): ?>

66 <?php $servName = base64_encode($mainServerName) ?>

67 <tr>

68 <th colspan="3"><h3><?php echo htmlspecialchars($mainServerName) ?></h3></th>

74 <th><label for="username_<?php echo $servName ?>">MySQL username</label></th>

75 <td colspan="2"><input class="input" type="text" name="username[<?php echo $servName ?>]" id="username_<?php echo $servName ?>" /></td>

76 </tr>

77 <tr>

78 <th><label for="password_<?php echo $servName ?>">MySQL password</label></th>

79 <td colspan="2"><input class="input" type="password" name="password[<?php echo $servName ?>]" id="password_<?php echo $servName ?>" /></td>

80 </tr>

81 <tr>

SharedKeyLite.php (https://github.com/timglabisch/pimcore.git) PHP · 152 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: SharedKeyLite.php 24593 2012-01-05 20:35:02Z matthew $

20 */

21

23 * @see Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

24 */

25 // require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';

26

27 /**

75 // Table storage?

76 if (!$forTableStorage) {

77 // require_once 'Zend/Service/WindowsAzure/Credentials/Exception.php';

78 throw new Zend_Service_WindowsAzure_Credentials_Exception('The Windows Azure SDK for PHP does not support SharedKeyLite authentication on blob or queue storage. Use SharedKey authentication instead.');

default_item.php (https://github.com/fastslack/joomla-cms.git) PHP · 106 lines

1 <?php

2 /**

3 * @package Joomla.Site

20 ?>

21

22 <?php if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDate())

23 || ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate())) : ?>

24 <div class="system-unpublished">

25 <?php endif; ?>

26

27 <?php if ($params->get('show_title')) : ?>

28 <h2 class="item-title" itemprop="headline">

29 <?php if ($params->get('link_titles') && $params->get('access-view')) : ?>

30 <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url">

lib.php (https://github.com/tmuras/moodle-debian.git) PHP · 164 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

74 $params = $fileinfo->get_params();

75 while ($level && $params['component'] == 'user' && $params['filearea'] == 'private') {

76 $encodedpath = base64_encode(serialize($level->get_params()));

77 $pathnodes[] = array('name'=>$level->get_visible_name(), 'path'=>$encodedpath);

78 $level = $level->get_parent();

85 foreach ($children as $child) {

86 if ($child->is_directory()) {

87 $encodedpath = base64_encode(serialize($child->get_params()));

88 $node = array(

89 'title' => $child->get_visible_name(),

96 $list[] = $node;

97 } else {

98 $encodedpath = base64_encode(serialize($child->get_params()));

99 $node = array(

100 'title' => $child->get_visible_name(),

smtp.php (https://github.com/hendrik-weiler/Portal-CMS.git) PHP · 269 lines

1 <?php

2 /**

3 * Fuel

4 *

5 * Fuel is a fast, lightweight, community driven PHP5 framework.

6 *

7 * @package Fuel

10 * @license MIT License

11 * @copyright 2010 - 2013 Fuel Development Team

12 * @link http://fuelphp.com

13 */

14

165 {

166 // Encode login data

167 $username = base64_encode($this->config['smtp']['username']);

168 $password = base64_encode($this->config['smtp']['password']);

cqglobalMP.inc.php (https://gitlab.com/nacridan/Nacridan) PHP · 133 lines

1 <?php

2

3 class CQGlobalMP extends HTMLObject

36 if ($_POST['createconfirm'] == 'yes') {

37

38 require_once (HOMEPATH . "/factory/MailFactory.inc.php");

39

40 $title = base64_decode($_POST["title"]);

96 $str .= "</table>";

97

98 $str .= "<input type='hidden' name='title' value='" . base64_encode($title) . "'/>";

99 $str .= "<input type='hidden' name='MPcontent' value='" . base64_encode($MPcontent) . "'/>";

Profiler.php (https://github.com/l3l0/BehatExamples.git) PHP · 329 lines

1 <?php

2

3 /*

106 public function export()

107 {

108 $data = base64_encode(serialize(array($this->token, $this->parent, $this->collectors, $this->ip, $this->url, $this->time)));

109

110 return $data;

126 }

127

128 $data = base64_encode(serialize($collectors));

129

130 $this->storage->write($token, $parent, $data, $ip, $url, $time);

254 $this->time = time();

255

256 $data = base64_encode(serialize($this->collectors));

257

258 if (true === $this->storage->write($this->token, $this->parent, $data, $this->ip, $this->url, $this->time)) {

extension.cache.mysql.php (https://bitbucket.org/kdeberna/akalepse.git) PHP · 173 lines

1 <?php

2 /////////////////////////////////////////////////////////////////

3 /// getID3() by James Heinrich <info@getid3.org> //

6 /////////////////////////////////////////////////////////////////

7 // //

8 // extension.cache.mysql.php - part of getID3() //

9 // Please see readme.txt for more information //

10 // ///

21 * way as the getID3 class, but return cached information very fast

22 *

23 * Example: (see also demo.cache.mysql.php in /demo/)

24 *

25 * Normal getID3 usage (example):

26 *

27 * require_once 'getid3/getid3.php';

28 * $getID3 = new getID3;

29 * $getID3->encoding = 'UTF-8';

actions.class.php (https://github.com/bravist/iCunQian.git) PHP · 328 lines

215 }

216

217 shell_exec("/usr/local/php5.2/bin/php /data/testsites/deposit/devel/batch/cronjobs/BatchQueue.php " . ApiOfflineQueuePeer::ICAIFU . " " . base64_encode(json_encode($this->post['personal_products'])));

218

219 //for test development

220 shell_exec("/usr/local/php5.2/bin/php /data/testsites/deposit/devel/batch/cronjobs/ApiOfflineDequeue.php");

221

222 // shell_exec('D:\upupw\PHP5\php.exe D:\Usr\Local\Web\Deposit\trunk\batch\cronjobs\BatchQueue.php ' . ApiOfflineQueuePeer::ICAIFU . ' ' . base64_encode(json_encode($this->post['personal_products'])));

223

224 $this->responseData = array('status' => 1);

284 }

285

286 shell_exec("/usr/local/php5.2/bin/php /data/testsites/deposit/devel/batch/cronjobs/BatchQueue.php " . ApiOfflineQueuePeer::FAVORITE . " " . base64_encode(json_encode($this->post['personal_favorites'])));

287

288 //for test development

FreemiusBase.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 178 lines

1 <?php

2 /**

3 * Copyright 2014 Freemius, Inc.

21

22 if ( ! function_exists( 'json_decode' ) ) {

23 throw new Exception( 'Freemius needs the JSON PHP extension.' );

24 }

25

34

35 foreach ( $exceptions as $e ) {

36 require FS_SDK__EXCEPTIONS_PATH . $e . '.php';

37 }

38

146 /**

147 * Base64 encoding that does not need to be urlencode()ed.

148 * Exactly the same as base64_encode except it uses

149 * - instead of +

150 * _ instead of /

externallib_test.php (https://github.com/moodlehq/totara.git) PHP · 127 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

17

18 /**

19 * PHPunit tests for external files API.

20 *

21 * @package core_files

29 global $CFG;

30

31 require_once($CFG->dirroot . '/webservice/tests/helpers.php');

32 require_once($CFG->dirroot . '/files/externallib.php');

50 $filepath = "/";

51 $filename = "Simple.txt";

52 $filecontent = base64_encode("Let us create a nice simple file");

53 $browser = get_file_browser();

54

math.php (https://github.com/F5/zetacomponents.git) PHP · 182 lines

1 <?php

2 /**

3 * File containing the ezcAuthenticationMath class.

36 {

37 /**

38 * Creates a new big number library which uses the PHP extension $lib.

39 *

40 * If $lib is null then an autodetection of the library is tried. If neither

45 *

46 * @throws ezcBaseExtensionNotFoundException

47 * if neither of the PHP gmp and bcmath extensions are installed ($lib === null),

48 * or if the specified $lib is not installed

49 * @throws ezcBaseValueException

50 * if the value provided for $lib is not correct

51 * @param string $lib The PHP library to use for big number support. Default

52 * is null, which means the available library is autodetected.

53 * @return ezcAuthenticationBignumLibrary

SharedKey.php (https://github.com/roxtaz/EvidPac.git) PHP · 154 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: SharedKey.php 35999 2009-12-21 07:56:42Z unknown $

20 */

21

23 * @see Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

24 */

25 require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';

26

27 /**

28 * @see Zend_Service_WindowsAzure_Storage

29 */

30 require_once 'Zend/Service/WindowsAzure/Storage.php';

31

32 /**

File_integrity.php (https://bitbucket.org/mbaily/tremain.git) PHP · 247 lines

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

2 /**

3 * ExpressionEngine - by EllisLab

237

238 ee()->db->query(ee()->db->update_string('exp_sites',

239 array('site_bootstrap_checksums' => base64_encode(serialize($checksums))),

240 "site_id = '".ee()->db->escape_str($site_id)."'"));

241 }

244 // END File_integrity class

245

246 /* End of file File_integrity.php */

247 /* Location: ./system/expressionengine/libraries/File_integrity.php */

authentication.php (https://github.com/quarkness/piwik.git) PHP · 238 lines

1 <?php

2 /**

3 * Base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage WebTester

6 * @version $Id: authentication.php 1720 2008-04-07 02:32:43Z lastcraft $

7 */

8 /**

9 * include http class

10 */

11 require_once(dirname(__FILE__) . '/http.php');

12

13 /**

232 if ($username && $password) {

233 $request->addHeaderLine(

234 'Authorization: Basic ' . base64_encode("$username:$password"));

235 }

236 }

cookie.test.php (https://github.com/ButuzGOL/inside_wildflowercms.git) PHP · 439 lines

8 * PHP versions 4 and 5

9 *

10 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>

11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)

12 *

16 * @filesource

17 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)

18 * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests

19 * @package cake

20 * @subpackage cake.tests.cases.libs.controller.components

235 $this->Controller->Cookie->destroy();

236

237 $this->Controller->Cookie->write(array('Encrytped_array' => array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' =>'CakePHP Rocks!')));

238 $this->Controller->Cookie->write(array('Encrytped_multi_cookies.name' => 'CakePHP'));

404

405 $data = $this->Controller->Cookie->read('Plain_multi_cookies');

406 $expected = array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' =>'CakePHP Rocks!');

407 $this->assertEqual($data, $expected);

408 $this->Controller->Cookie->destroy();

SharedKey.php (https://github.com/vivid-planet/library.git) PHP · 154 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: SharedKey.php 20785 2010-01-31 09:43:03Z mikaelkael $

20 */

21

23 * @see Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

24 */

25 require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';

26

27 /**

28 * @see Zend_Service_WindowsAzure_Storage

29 */

30 require_once 'Zend/Service/WindowsAzure/Storage.php';

31

32 /**

SmtpTransport.php (https://github.com/dbarbar/spotbox.git) PHP · 229 lines

1 <?php

2 /**

3 * Send mail using SMTP protocol

5 * PHP 5

6 *

7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

9 *

12 *

13 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

14 * @link http://cakephp.org CakePHP(tm) Project

15 * @package Cake.Network.Email

16 * @since CakePHP(tm) v 2.0.0

17 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

18 */

19 App::uses('CakeSocket', 'Network');

global.login.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 112 lines

1 <?php

2

3 /**

44 if ( ! defined( 'NV_IS_ADMIN' ) )

45 {

46 $xtpl->assign( 'LOGOUT_ADMIN', "" . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=users&amp;" . NV_OP_VARIABLE . "=logout" );

47 $xtpl->parse( 'signed.admin' );

48 }

49 $xtpl->assign( 'CHANGE_PASS', "" . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=users&amp;" . NV_OP_VARIABLE . "=changepass" );

50 $xtpl->assign( 'CHANGE_INFO', "" . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=users" );

94 foreach ( $openid_servers as $server => $value )

95 {

96 $assigns['href'] = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=users&amp;" . NV_OP_VARIABLE . "=login&amp;server=" . $server . "&amp;nv_redirect=" . nv_base64_encode( $client_info['selfurl'] );

97 $assigns['title'] = ucfirst( $server );

98 $assigns['img_src'] = NV_BASE_SITEURL . "themes/" . $block_theme . "/images/users/" . $server . ".gif";

Serializer.php (https://gitlab.com/rocs/Streaming-Safe-for-Kids) PHP · 221 lines

1 <?php namespace SuperClosure;

2

3 use SuperClosure\Analyzer\AstAnalyzer as DefaultAnalyzer;

77 if ($this->signingKey) {

78 $signature = $this->calculateSignature($serialized);

79 $serialized = '%' . base64_encode($signature) . $serialized;

80 }

81

Signer.php (https://github.com/trob/fabrik.git) PHP · 123 lines

1 <?php

2 namespace Aws\CloudFront;

3

46 public function __destruct()

47 {

48 if (PHP_MAJOR_VERSION < 8) {

49 $this->pkHandle && openssl_pkey_free($this->pkHandle);

50 } else {

119 private function encode($policy)

120 {

121 return strtr(base64_encode($policy), '+=/', '-_~');

122 }

123 }

PhabricatorFileAES256StorageFormat.php (https://github.com/dannysu/phabricator.git) PHP · 199 lines

1 <?php

2

3 /**

22 $envelope = self::newAES256Key();

23 $material = $envelope->openEnvelope();

24 return base64_encode($material);

25 }

26

71 // Encode the raw binary data with base64 so we can wrap it in JSON.

72 $data = array(

73 'iv.base64' => base64_encode($iv_envelope->openEnvelope()),

74 'key.base64' => base64_encode($key_envelope->openEnvelope()),

86 return array(

87 'key.name' => $key_name,

88 'iv.base64' => base64_encode($data_iv->openEnvelope()),

89 'payload.base64' => base64_encode($data_cipher),

timezone.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 132 lines

1 <?php

2 /**

3 * @Project NUKEVIET 3.0

70 }

71 define( 'NV_CLIENT_TIMEZONE_DST', $matches2[1] != $matches2[2] ? 1 : 0 );

72 $client_timezone_name = base64_encode( NV_CLIENT_TIMEZONE_NAME . '.' . NV_CLIENT_TIMEZONE_OFFSET . '.' . NV_CLIENT_TIMEZONE_DST );

73 setcookie( $global_config['cookie_prefix'] . '_cltn', $client_timezone_name, 0, $matches2[4], '', 0 );

74 unset( $client_timezone_name, $sd );

user_create.php (https://github.com/heliopsis/cjw_newsletter.git) PHP · 217 lines

1 <?php

2 /**

3 * File user_create.php

23 // - newsletter/subscription_list ?RedirectUrl=

24

25 require_once( 'kernel/common/i18n.php' );

26 include_once( 'kernel/common/template.php' );

194 }

195

196 $tpl->setVariable( 'old_post_var_serialized', base64_encode( serialize( $oldPostArray ) ) );

197

198 $tpl->setVariable( 'subscription_data_array', $subscriptionDataArr );

Encrypter.php (https://gitlab.com/jjpa2018/dashboard) PHP · 267 lines

1 <?php

2

3 namespace Illuminate\Encryption;

116 }

117

118 $iv = base64_encode($iv);

119 $tag = base64_encode($tag);

129 }

130

131 return base64_encode($json);

132 }

133

Serialize.php (https://github.com/imr/horde.git) PHP · 363 lines

1 <?php

2 /**

3 * The Serialize:: class provides various methods of encapsulating data.

213

214 case self::BASE64:

215 $data = base64_encode($data);

216 break;

217

MCrypt.php (https://bitbucket.org/niidees/madserve.git) PHP · 82 lines

1 <?php

2 /**

3 * FluxBB

28 /**

29 * The MCrypt filter encrypts data using the given cipher and secret key.

30 * http://uk2.php.net/manual/en/book.mcrypt.php

31 */

32

72 {

73 $data = mcrypt_encrypt($this->cipher, $this->key, $data, $this->mode, $this->iv);

74 return base64_encode($data);

75 }

76

product_downloadable_with_files.php (https://gitlab.com/axeltizon/magento-demopoweraccess) PHP · 156 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

82 $content = $objectManager->create('Magento\Downloadable\Api\Data\File\ContentInterfaceFactory')->create();

83 $content->setFileData(

84 base64_encode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR.'test_image.jpg'))

85 );

86 $content->setName('jellyfish_2_4.jpg');

93 $sampleContent = $objectManager->create('Magento\Downloadable\Api\Data\File\ContentInterfaceFactory')->create();

94 $sampleContent->setFileData(

95 base64_encode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR.'test_image.jpg'))

96 );

97 $sampleContent->setName('jellyfish_1_3.jpg');

137 $content = $objectManager->create('Magento\Downloadable\Api\Data\File\ContentInterfaceFactory')->create();

138 $content->setFileData(

139 base64_encode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR.'test_image.jpg'))

140 );

141 $content->setName('jellyfish_1_4.jpg');

session.php (https://github.com/jshaw86/core.git) PHP · 434 lines

1 <?php defined('SYSPATH') or die('No direct script access.');

2 /**

3 * Base session class.

129 * Session object is rendered to a serialized string. If encryption is

130 * enabled, the session will be encrypted. If not, the output string will

131 * be encoded using [base64_encode].

132 *

133 * echo $session;

149 {

150 // Obfuscate the data with base64 encoding

151 $data = base64_encode($data);

152 }

153

class-postmark-helper.php (https://gitlab.com/chernushov881/charity-fund) PHP · 188 lines

51 $this->token = $PHPMAILER->Postmark_Api_Key;

52 $recipients = $this->_get_recipients($PHPMAILER);

53

54 if (!empty($recipients['ReplyTo'])) {

59 $this->send_mail_obj['Cc'] = $this->_format_array_of_address($recipients['Cc']);

60 $this->send_mail_obj['Bcc'] = $this->_format_array_of_address($recipients['Bcc']);

61 $this->send_mail_obj['From'] = $this->_format_address($PHPMAILER->From, $PHPMAILER->FromName);

62 $this->send_mail_obj['Subject'] = $PHPMAILER->Subject;

64 $this->send_mail_obj['TextBody'] = $PHPMAILER->AltBody;

65 $this->send_mail_obj['MessageStream'] = 'outbound';

66 $this->send_mail_obj['Attachments'] = $this->get_attachments($PHPMAILER);

67

68 $this->send_mail_obj = array_filter($this->send_mail_obj);

107 {

108 return [

109 'To' => array_filter($PHPMAILER->getToAddresses()),

110 'Cc' => array_filter($PHPMAILER->getCcAddresses()),

function.fetch.php (https://github.com/md-tech/openemr.git) PHP · 214 lines

1 <?php

2

3 /*

167 }

168 if(!empty($user) && !empty($pass)) {

169 fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");

170 }

171

image.php (https://github.com/cms3/cms3.git) PHP · 112 lines

1 <?php

2

3 namespace CMS3\Images;

99 public function encode_params($params)

100 {

101 $string = base64_encode(serialize($params));

102

103 return rtrim($string, '=');

ListProductTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 177 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

7

8 /**

9 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)

10 */

11 class ListProductTest extends \PHPUnit_Framework_TestCase

17

18 /**

19 * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject

20 */

21 protected $registryMock;

22

23 /**

24 * @var \PHPUnit_Framework_MockObject_MockObject

25 */

26 protected $layerMock;

Detail.php (https://github.com/fetus-hina/OhkaJournal.git) PHP · 204 lines

1 <?php

2 class Oj_OAuth_Detail {

3 // 3.6.

142 $http_post_content));

143 return

144 base64_encode(

145 self::hmacSha1(

146 self::signatureBaseString(

Encrypter.php (https://gitlab.com/MineYourMind/BoNeMEAL) PHP · 306 lines

1 <?php namespace Illuminate\Encryption;

2

3 use Exception;

58 $iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer());

59

60 $value = base64_encode($this->padAndMcrypt($value, $iv));

61

62 // Once we have the encrypted value we will go ahead base64_encode the input

63 // vector and create the MAC for the encrypted value so we can verify its

64 // authenticity. Then, we'll JSON encode the data in a "payload" array.

65 $mac = $this->hash($iv = base64_encode($iv), $value);

66

67 return base64_encode(json_encode(compact('iv', 'value', 'mac')));

function.fetch.php (https://github.com/quarkness/piwik.git) PHP · 221 lines

1 <?php

2 /**

3 * Smarty plugin

13 * Name: fetch<br>

14 * Purpose: fetch file, web or ftp data and display results

15 * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}

16 * (Smarty online manual)

17 * @author Monte Ohrt <monte at ohrt dot com>

31 if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {

32 $_params = array('resource_type' => 'file', 'resource_name' => $params['file']);

33 require_once(SMARTY_CORE_DIR . 'core.is_secure.php');

34 if(!smarty_core_is_secure($_params, $smarty)) {

35 $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');

174 }

175 if(!empty($user) && !empty($pass)) {

176 fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");

177 }

178

passhash.php (https://github.com/bproctor/PassHash.git) PHP · 144 lines

1 <?php

2

3 /**

4 * passhash.php

5 *

6 * A strong password hashing class for PHP

13 * @author Brad Proctor

14 * @copyright Copyright (c) 2010-2012 Brad Proctor

15 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

16 * @link http://bradleyproctor.com/

17 * @version 1.9.1

24 * also created using the HMAC method and a site wide key is used to further secure the hash. The site

25 * wide key can be any value, but a very strong 80-character unique value for 'authPepper' can be generated at

26 * http://bradleyproctor.com/tools/salt.php

27 *

28 * Usage:

Encrypt.php (https://gitlab.com/vince.omega/mcb-nov-build) PHP · 164 lines

1 <?php defined('SYSPATH') OR die('No direct access allowed.');

2 /**

3 * The Encrypt library provides two-way encryption of text and binary strings

4 * using the MCrypt extension.

5 * @see http://php.net/mcrypt

6 *

7 * $Id: Encrypt.php 4072 2009-03-13 17:20:38Z jheathco $

10 * @author Kohana Team

11 * @copyright (c) 2007-2008 Kohana Team

12 * @license http://kohanaphp.com/license.html

13 */

14 class Encrypt_Core {

138

139 // Use base64 encoding to convert to a string

140 return base64_encode($iv.$data);

141 }

142

mail.php (https://bitbucket.org/Antonnk/opencart22.git) PHP · 427 lines

90 $header .= 'To: <' . $to . '>' . PHP_EOL;

91 $header .= 'Subject: =?UTF-8?B?' . base64_encode($this->subject) . '?=' . PHP_EOL;

92 }

93

103 $header .= 'Return-Path: ' . $this->from . PHP_EOL;

104 $header .= 'X-Mailer: PHP/' . phpversion() . PHP_EOL;

105 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . PHP_EOL . PHP_EOL;

109 $message .= 'Content-Type: text/plain; charset="utf-8"' . PHP_EOL;

110 $message .= 'Content-Transfer-Encoding: 8bit' . PHP_EOL . PHP_EOL;

111 $message .= $this->text . PHP_EOL;

126 $message .= 'Content-Type: text/html; charset="utf-8"' . PHP_EOL;

127 $message .= 'Content-Transfer-Encoding: 8bit' . PHP_EOL . PHP_EOL;

128 $message .= $this->html . PHP_EOL;

144 $message .= 'Content-ID: <' . basename(urlencode($attachment)) . '>' . PHP_EOL;

145 $message .= 'X-Attachment-Id: ' . basename(urlencode($attachment)) . PHP_EOL . PHP_EOL;

146 $message .= chunk_split(base64_encode($content));

Login.php (https://github.com/intypica/zf2.git) PHP · 98 lines

1 <?php

2 /**

3 * Zend Framework

90 $this->_send('AUTH LOGIN');

91 $this->_expect(334);

92 $this->_send(base64_encode($this->_username));

93 $this->_expect(334);

94 $this->_send(base64_encode($this->_password));

authentication.php (https://github.com/nattaphat/hgis.git) PHP · 237 lines

1 <?php

2 /**

3 * Base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage WebTester

6 * @version $Id: authentication.php 1784 2008-04-26 13:07:14Z pp11 $

7 */

8 /**

9 * include http class

10 */

11 require_once(dirname(__FILE__) . '/http.php');

12

13 /**

231 if ($username && $password) {

232 $request->addHeaderLine(

233 'Authorization: Basic ' . base64_encode("$username:$password"));

234 }

235 }

Account.php (https://gitlab.com/wuhang2003/rainloop-webmail) PHP · 576 lines

1 <?php

2

3 namespace RainLoop\Model;

444 {

445 $oMailClient->LoginWithXOauth2(

446 \base64_encode('user='.$aImapCredentials['Login']."\1".'auth=Bearer '.\substr($sPassword, $iGatLen)."\1\1"));

447 }

448 else

476 'UseConnect' => true,

477 'UseAuth' => $this->DomainOutAuth(),

478 'UsePhpMail' => $bUsePhpMail,

479 'Ehlo' => \MailSo\Smtp\SmtpClient::EhloHelper(),

480 'Host' => $this->DomainOutHost(),

491 $oPlugins->RunHook('filter.smtp-credentials', array($this, &$aSmtpCredentials));

492

493 $bUsePhpMail = $aSmtpCredentials['UsePhpMail'];

494

495 $oPlugins->RunHook('event.smtp-pre-connect', array($this, $aSmtpCredentials['UseConnect'], $aSmtpCredentials));

Rand.php (https://github.com/christeredvartsen/zf2.git) PHP · 175 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

41 // PHP bug #55169

42 // @see https://bugs.php.net/bug.php?id=55169

43 if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' ||

44 version_compare(PHP_VERSION, '5.3.7') >= 0) {

45 $rand = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);

46 if ($rand !== false && strlen($rand) === $length) {

51 if ($strong) {

52 throw new Exception\RuntimeException(

53 'This PHP environment doesn\'t support secure random number generation. ' .

54 'Please consider to install the OpenSSL and/or Mcrypt extensions'

55 );

EmbeddedFileAcceptanceTest.php (https://bitbucket.org/nick_snyder/summer.git) PHP · 150 lines

1 <?php

2

3 require_once 'Swift/Mime/EmbeddedFile.php';

4 require_once 'Swift/Mime/Headers/UnstructuredHeader.php';

5 require_once 'Swift/Mime/Headers/ParameterizedHeader.php';

6 require_once 'Swift/Mime/Headers/IdentificationHeader.php';

7 require_once 'Swift/Encoder/Rfc2231Encoder.php';

8 require_once 'Swift/Mime/ContentEncoder/Base64ContentEncoder.php';

9 require_once 'Swift/Mime/HeaderEncoder/QpHeaderEncoder.php';

10 require_once 'Swift/CharacterStream/ArrayCharacterStream.php';

11 require_once 'Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php';

Encrypter.php (https://bitbucket.org/nick_snyder/summer.git) PHP · 260 lines

1 <?php namespace Illuminate\Encryption;

2

3 class DecryptException extends \RuntimeException {}

54 $iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer());

55

56 $value = base64_encode($this->padAndMcrypt($value, $iv));

57

58 // Once we have the encrypted value we will go ahead base64_encode the input

59 // vector and create the MAC for the encrypted value so we can verify its

60 // authenticity. Then, we'll JSON encode the data in a "payload" array.

61 $mac = $this->hash($iv = base64_encode($iv), $value);

62

63 return base64_encode(json_encode(compact('iv', 'value', 'mac')));

Link.php (https://github.com/sbuckpesch/Quiz_App2.git) PHP · 194 lines

1 <?php

2

3 /**

34 }

35

36 //$app_data=base64_encode($param_str);

37 $app_data=base64_encode($param_str);

56 $param_str=trim($param_str,"&");

57

58 $url='http://apps.facebook.com/'.$global->instance['fb_app_url'].'/index.php?'.$param_str;

59

60 return $url;

74 $param_str=trim($param_str,"&");

75

76 $url=$global->baseurl.'/index.php?'.$param_str;

77

78 return $url;

Notify.php (https://bitbucket.org/AntonTyutin/pretty-simpla.git) PHP · 192 lines

1 <?php

2

3 /**

20 $headers .= "reply-to: $reply_to\r\n";

21

22 $subject = "=?utf-8?B?".base64_encode($subject)."?=";

23

24 @mail($to, $subject, $message, $headers);