PageRenderTime 1295ms queryTime 286ms sortTime 20ms getByIdsTime 216ms findMatchingLines 327ms

100+ results results for 'php crypt repo:sezuan/core' (1295 ms)

Not the results you expected?
NativeBaseController.php https://gitlab.com/wuhang2003/phpwind | PHP | 293 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @fileName: NativeBaseController.php
                    
6 * @author: dongyong<dongyong.ydy@alibaba-inc.com><34214399@qq.com>
                    
6 * @author: dongyong<dongyong.ydy@alibaba-inc.com><34214399@qq.com>
                    
7 * @license: http://www.phpwind.com
                    
8 * @version: $Id
                    
100        );
                    
101        $securityKey = Pw::encrypt( serialize($_idInfo), $this->_securityKey);
                    
102
                    
179        if( $unsecurityKey ){
                    
180            $securityKey = unserialize(Pw::decrypt($unsecurityKey,$this->_securityKey));
                    
181            if( is_array($securityKey) && isset($securityKey['username']) && isset($securityKey['password']) ){
                    
                
app.php https://gitlab.com/ducnv/BTL_CN_WEB | PHP | 249 lines
                    
1<?php
                    
2
                    
68    | Here you may specify the default timezone for your application, which
                    
69    | will be used by the PHP date and date-time functions. We have gone
                    
70    | ahead and set this to a sensible default for you out of the box.
                    
103    |--------------------------------------------------------------------------
                    
104    | Encryption Key
                    
105    |--------------------------------------------------------------------------
                    
106    |
                    
107    | This key is used by the Illuminate encrypter service and should be set
                    
108    | to a random, 32 character string, otherwise these encrypted strings
                    
156        Illuminate\Database\DatabaseServiceProvider::class,
                    
157        Illuminate\Encryption\EncryptionServiceProvider::class,
                    
158        Illuminate\Filesystem\FilesystemServiceProvider::class,
                    
210        'Cookie' => Illuminate\Support\Facades\Cookie::class,
                    
211        'Crypt' => Illuminate\Support\Facades\Crypt::class,
                    
212        'DB' => Illuminate\Support\Facades\DB::class,
                    
                
Css.php https://gitlab.com/svillegas/magento2 | PHP | 301 lines
                    
1<?php
                    
2/**
                    
15 *
                    
16 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
                    
17 * @SuppressWarnings(PHPMD.DepthOfInheritance)
                    
35    /**
                    
36     * @var \Magento\Framework\Encryption\UrlCoder
                    
37     */
                    
45     * @param \Magento\Theme\Model\Uploader\Service $uploaderService
                    
46     * @param \Magento\Framework\Encryption\UrlCoder $urlCoder
                    
47     * @param array $data
                    
54        \Magento\Theme\Model\Uploader\Service $uploaderService,
                    
55        \Magento\Framework\Encryption\UrlCoder $urlCoder,
                    
56        array $data = []
                    
136     * @return $this
                    
137     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
                    
138     */
                    
                
CoreController.php https://gitlab.com/billyprice1/MFAdmin | PHP | 419 lines
                    
1<?php namespace App\Http\Controllers;
                    
2
                    
102
                    
103		$encrypter = app('Illuminate\Encryption\Encrypter');
                    
104		$encrypted_csrf_token = $encrypter->encrypt($csrf_token);
                    
106		$this->assign('csrf_token', $csrf_token, self::SECTION_JS);
                    
107		$this->assign('encrypted_csrf_token', $encrypted_csrf_token, self::SECTION_JS);
                    
108
                    
                
Encryptor.php https://gitlab.com/shinvdu/shadowsocks-php | PHP | 349 lines
                    
26    protected static $_cachedTables = array();
                    
27    protected static $_encryptTable = array();
                    
28    protected static $_decryptTable = array();
                    
50        $_ref = self::getTable($key);
                    
51        self::$_encryptTable = $_ref[0];
                    
52        self::$_decryptTable = $_ref[1];
                    
85        $table = array();
                    
86        $decrypt_table = array();
                    
87        $hash = md5($key, true);
                    
109       ksort($decrypt_table);
                    
110       $decrypt_table = array_values($decrypt_table);
                    
111       $result = array($table, $decrypt_table);
                    
201        {
                    
202            return self::substitute(self::$_decryptTable, $buffer);
                    
203        }
                    
                
AccountControl.php https://gitlab.com/R13e/Adldap2 | PHP | 451 lines
                    
1<?php
                    
2
                    
23
                    
24    const ENCRYPTED_TEXT_PWD_ALLOWED = 128;
                    
25
                    
331    /**
                    
332     * The user can send an encrypted password.
                    
333     *
                    
335     */
                    
336    public function allowEncryptedTextPassword()
                    
337    {
                    
337    {
                    
338        $this->applyValue(self::ENCRYPTED_TEXT_PWD_ALLOWED);
                    
339
                    
392     * (Windows 2000/Windows Server 2003) Restrict this principal to
                    
393     * use only Data Encryption Standard (DES) encryption types for keys.
                    
394     *
                    
                
cookie.rst https://gitlab.com/albertkeba/docs | ReStructuredText | 183 lines
                    
29|                 |              |                                                      |
                    
30|                 |              | When using rijndael or aes encryption, this value    |
                    
31|                 |              | must be longer than 32 bytes.                        |
                    
40|                 |              | the browser is closed. If a string is set, this will |
                    
41|                 |              | be interpreted with PHP function strtotime(). You can|
                    
42|                 |              | set this directly within the write() method.         |
                    
88
                    
89.. php:method:: write(mixed $key, mixed $value = null, boolean $encrypt = true, mixed $expires = null)
                    
90
                    
113    the encryption mode to 'aes' to ensure that values are securely
                    
114    encrypted::
                    
115
                    
119    until your cookie will expire. For convenience, this parameter can
                    
120    also be passed as a string that the php strtotime() function
                    
121    understands::
                    
                
config.php https://gitlab.com/zulkufadsiz/kosanlar.com | PHP | 362 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
173|	0 = Disables logging, Error logging TURNED OFF
                    
174|	1 = Error Messages (including PHP errors)
                    
175|	2 = Debug Messages
                    
200|
                    
201| Each item that is logged has an associated date. You can use PHP date
                    
202| codes to set your own date formatting
                    
219|--------------------------------------------------------------------------
                    
220| Encryption Key
                    
221|--------------------------------------------------------------------------
                    
226*/
                    
227$config['encryption_key'] = 'krafik';
                    
228
                    
238|   when the browser window is closed
                    
239| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
240| 'sess_use_database'		= Whether to save the session data to a database
                    
                
uc.php http://phpfor.googlecode.com/svn/trunk/ | PHP | 301 lines
                    
1<?php
                    
2define('UC_VERSION', '1.0.0');        //UCenter ????
                    
19ob_start();
                    
20define('PHP_SELF',dirname($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']));
                    
21if(include(dirname(__FILE__).'/../config/config.php')){
                    
22    ob_end_clean();
                    
23    require(CORE_DIR.'/kernel.php');
                    
24    require(CORE_DIR.'/include/shopCore.php');
                    
25    require_once(CORE_DIR.'/func_ext.php');
                    
26    require(CORE_DIR.'/lib/uc_client/lib/xml.class.php');
                    
27    class ucCore extends shopCore{
                    
37
                    
38            $cryptkey = $keya.md5($keya.$keyc);
                    
39            $key_length = strlen($cryptkey);
                    
48            for($i = 0; $i <= 255; $i++) {
                    
49                $rndkey[$i] = ord($cryptkey[$i % $key_length]);
                    
50            }
                    
                
config.php https://gitlab.com/stevie007/frontiertrading | PHP | 362 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
173|	0 = Disables logging, Error logging TURNED OFF
                    
174|	1 = Error Messages (including PHP errors)
                    
175|	2 = Debug Messages
                    
200|
                    
201| Each item that is logged has an associated date. You can use PHP date
                    
202| codes to set your own date formatting
                    
219|--------------------------------------------------------------------------
                    
220| Encryption Key
                    
221|--------------------------------------------------------------------------
                    
226*/
                    
227$config['encryption_key'] = 'let us hide';
                    
228
                    
238|   when the browser window is closed
                    
239| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
240| 'sess_use_database'		= Whether to save the session data to a database
                    
                
CacheManager.php https://gitlab.com/dzakiafif/cokelatklasik | PHP | 311 lines
                    
1<?php
                    
2
                    
218            new DatabaseStore(
                    
219                $connection, $this->app['encrypter'], $config['table'], $this->getPrefix($config)
                    
220            )
                    
                
config.php http://records-authority.googlecode.com/svn/ | PHP | 371 lines
                    
179|	0 = Disables logging, Error logging TURNED OFF
                    
180|	1 = Error Messages (including PHP errors)
                    
181|	2 = Debug Messages
                    
206|
                    
207| Each item that is logged has an associated date. You can use PHP date
                    
208| codes to set your own date formatting
                    
228|
                    
229| If you use the Encryption class or the Sessions class with encryption
                    
230| enabled you MUST set an encryption key.  See the user guide for info.
                    
232*/
                    
233$config['encryption_key'] = "R3c0rdM@n@g3m3ntL1@50n";
                    
234
                    
240| 'session_cookie_name' = the name you want for the cookie
                    
241| 'encrypt_sess_cookie' = TRUE/FALSE (boolean).  Whether to encrypt the cookie
                    
242| 'session_expiration'  = the number of SECONDS you want the session to last.
                    
                
Backup.php https://gitlab.com/yousafsyed/easternglamor | PHP | 436 lines
                    
1<?php
                    
2/**
                    
16 * @method string getTime()
                    
17 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
                    
18 */
                    
64    /**
                    
65     * @var \Magento\Framework\Encryption\EncryptorInterface
                    
66     */
                    
77     * @param \Magento\Backend\Model\Auth\Session $authSession
                    
78     * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
                    
79     * @param \Magento\Framework\Filesystem $filesystem
                    
85        \Magento\Backend\Model\Auth\Session $authSession,
                    
86        \Magento\Framework\Encryption\EncryptorInterface $encryptor,
                    
87        \Magento\Framework\Filesystem $filesystem,
                    
89    ) {
                    
90        $this->_encryptor = $encryptor;
                    
91        parent::__construct($data);
                    
                
SecureStreamClientBase.cs https://openHistorian.svn.codeplex.com/svn | C# | 267 lines
                    
10//
                    
11//      http://www.opensource.org/licenses/eclipse-1.0.php
                    
12//
                    
28using System.Security.Authentication;
                    
29using System.Security.Cryptography.X509Certificates;
                    
30using GSF.Diagnostics;
                    
33using GSF.Security.Authentication;
                    
34using Org.BouncyCastle.Crypto;
                    
35#endif
                    
62        {
                    
63            ssl = new SslStream(stream, false, UserCertificateValidationCallback, UserCertificateSelectionCallback, EncryptionPolicy.RequireEncryption);
                    
64            try
                    
                
cipherer.php https://gitlab.com/Lidbary/PHPRunner | PHP | 297 lines
                    
66		{
                    
67			if( !$this->pSet->hasEncryptedFields() || !isEncryptionByPHPEnabled() )
                    
68				return $fetchedArray;
                    
172	{
                    
173		if(isEncryptionByPHPEnabled() || !$this->isFieldEncrypted($alias != null ? $alias : $field))
                    
174			return $field;
                    
220	{
                    
221		if( !$this->isFieldEncrypted($field) || isEncryptionByPHPEnabled() )
                    
222			return $value;
                    
256	{		
                    
257		if( $this->isFieldEncrypted($field) && isEncryptionByPHPEnabled() )
                    
258		{
                    
277	{
                    
278		if($this->isFieldEncrypted($field) && isEncryptionByPHPEnabled())
                    
279		{
                    
                
upload.php http://rapidleech.googlecode.com/svn/trunk/ | PHP | 264 lines
                    
14require_once(CONFIG_DIR.'setup.php');
                    
15require_once("classes/other.php");
                    
16define ( 'TEMPLATE_DIR', 'templates/'.$options['template_used'].'/' );
                    
20
                    
21include("classes/http.php");
                    
22
                    
35		if (is_file ( HOST_DIR . "upload/" . $modules )) {
                    
36			if (strpos ( $modules, ".index.php" ))
                    
37				include_once (HOST_DIR . "upload/" . $modules);
                    
47?>
                    
48<?php
                    
49if (!file_exists($_REQUEST['filename']))
                    
247if (isset($_GET['auul'])) {
                    
248?><script type="text/javascript">parent.nextlink<?php echo $_GET['auul']; ?>();</script><?php
                    
249	// Write links to a file
                    
                
email.rst https://gitlab.com/atoz-chevara/CodeIgniter | ReStructuredText | 405 lines
                    
80instead put them into a config file. Simply create a new file called the
                    
81email.php, add the $config array in that file. Then save the file at
                    
82config/email.php and it will be used automatically. You will NOT need to
                    
103**smtp_keepalive**  FALSE                  TRUE or FALSE (boolean)      Enable persistent SMTP connections.
                    
104**smtp_crypto**     No Default             tls or ssl                   SMTP Encryption
                    
105**wordwrap**        TRUE                   TRUE or FALSE (boolean)      Enable word-wrap.
                    
197
                    
198	.. php:method:: cc($cc)
                    
199
                    
220
                    
221	.. php:method:: subject($subject)
                    
222
                    
230
                    
231	.. php:method:: message($body)
                    
232
                    
                
FilterIntervalSlider.php https://gitlab.com/Lidbary/PHPRunner | PHP | 400 lines
                    
1<?php
                    
2class FilterIntervalSlider extends FilterControl
                    
110		$data = $this->connection->query( $this->strSQL )->fetchAssoc(); 
                    
111		$this->decryptDataRow($data);
                    
112		
                    
                
Client.php https://gitlab.com/gregtyka/SiberianCMS | PHP | 336 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Client.php 25167 2012-12-19 16:28:01Z matthew $
                    
20 */
                    
22/** Zend_Oauth */
                    
23require_once 'Zend/Oauth.php';
                    
24
                    
25/** Zend_Http_Client */
                    
26require_once 'Zend/Http/Client.php';
                    
27
                    
28/** Zend_Oauth_Http_Utility */
                    
29require_once 'Zend/Oauth/Http/Utility.php';
                    
30
                    
31/** Zend_Oauth_Config */
                    
32require_once 'Zend/Oauth/Config.php';
                    
33
                    
                
encryptalltest.php https://gitlab.com/wuhang2003/core | PHP | 335 lines
                    
128		/** @var EncryptAll  | \PHPUnit_Framework_MockObject_MockObject  $encryptAll */
                    
129		$encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
                    
130			->setConstructorArgs(
                    
157		/** @var EncryptAll  | \PHPUnit_Framework_MockObject_MockObject  $encryptAll */
                    
158		$encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
                    
159			->setConstructorArgs(
                    
187		/** @var EncryptAll  | \PHPUnit_Framework_MockObject_MockObject  $encryptAll */
                    
188		$encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
                    
189			->setConstructorArgs(
                    
236		/** @var EncryptAll  | \PHPUnit_Framework_MockObject_MockObject  $encryptAll */
                    
237		$encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
                    
238			->setConstructorArgs(
                    
269		/** @var EncryptAll  | \PHPUnit_Framework_MockObject_MockObject  $encryptAll */
                    
270		$encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
                    
271			->setConstructorArgs(
                    
                
AdminPreferencesController.php https://gitlab.com/goolic/PrestaShop | PHP | 246 lines
                    
1<?php
                    
2/**
                    
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
                    
22 * @copyright 2007-2015 PrestaShop SA
                    
23 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
                    
24 * International Registered Trademark & Property of PrestaShop SA
                    
97                    'title' => $this->l('Enable SSL'),
                    
98                    'desc' => $this->l('If you own an SSL certificate for your shop\'s domain name, you can activate SSL encryption (https://) for customer account identification and order processing.'),
                    
99                    'hint' => $this->l('If you want to enable SSL on all the pages of your shop, activate the "Enable on all the pages" option below.'),
                    
                
compile.sh git://pkgs.fedoraproject.org/testdisk | Shell | 323 lines
                    
168          powerpc-apple-darwin|i686-apple-darwin9)
                    
169	  	CC=$TESTDISKCC ./configure --host=$crosscompile_target --prefix=$prefix --disable-default-device-io-ops --disable-crypto --disable-nfconv
                    
170		;;
                    
171	*)
                    
172		CC=$TESTDISKCC ./configure --host=$crosscompile_target --prefix=$prefix --disable-default-device-io-ops --disable-crypto
                    
173		;;
                    
213# --disable-default-device-io-ops is need for NT 4
                    
214        ./configure --host=$crosscompile_target --prefix=$prefix --disable-default-device-io-ops --disable-crypto
                    
215        cd $pwd_saved
                    
237    then
                    
238  	$LYNX "http://sourceforge.net/project/platformdownload.php?group_id=167783"
                    
239  fi
                    
                
ring_signature_1.cpp https://gitlab.com/nexxuz/cryptonote | C++ | 318 lines
                    
1// Copyright (c) 2011-2014 The Cryptonote developers
                    
2// Distributed under the MIT/X11 software license, see the accompanying
                    
2// Distributed under the MIT/X11 software license, see the accompanying
                    
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
                    
4
                    
8using namespace epee;
                    
9using namespace cryptonote;
                    
10
                    
70
                    
71bool gen_ring_signature_1::check_balances_1(cryptonote::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
                    
72{
                    
78  std::list<block> blocks;
                    
79  bool r = c.get_blocks(0, 100 + 2 * CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW, blocks);
                    
80  CHECK_TEST_CONDITION(r);
                    
81
                    
82  std::vector<cryptonote::block> chain;
                    
83  map_hash2tx_t mtx;
                    
                
encryption.php https://gitlab.com/Red54/core | PHP | 368 lines
                    
25	/**
                    
26	 * @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject
                    
27	 */
                    
35	/**
                    
36	 * @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject
                    
37	 */
                    
165	protected function buildMockModule() {
                    
166		$this->encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
                    
167			->disableOriginalConstructor()
                    
167			->disableOriginalConstructor()
                    
168			->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'getUnencryptedBlockSize', 'isReadable'])
                    
169			->getMock();
                    
178		$this->encryptionModule->expects($this->any())->method('shouldEncrypt')->willReturn(true);
                    
179		$this->encryptionModule->expects($this->any())->method('getUnencryptedBlockSize')->willReturn(8192);
                    
180		$this->encryptionModule->expects($this->any())->method('isReadable')->willReturn(true);
                    
                
newlisp.php https://gitlab.com/suyesh/ckeditor-dev | PHP | 191 lines
                    
1<?php
                    
2/*************************************************************************************
                    
2/*************************************************************************************
                    
3 * newlisp.php
                    
4 * ----------
                    
64            'div','do-until','do-while','doargs','dolist','dostring','dotimes',
                    
65            'dotree','dump','dup','empty?','encrypt','ends-with','env','erf',
                    
66            'error-event','estack','eval','eval-string','exec','exists','exit',
                    
                
GuiZombieWorldSlot.java https://gitlab.com/BGCX261/zombie-craft-svn-to-git.git | Java | 274 lines
                    
53		    // Encrypt
                    
54		    //String encrypted = encrypter.encrypt("Don't tell anybody!");
                    
55		    
                    
61		    //System.out.println(encrypter.encrypt("r.0.0.mcr"));
                    
62		    //System.out.println(encrypter.encrypt("http://modzilla.zymichost.com/store/haspaid.php?user="));
                    
63		    //System.out.println(encrypter.encrypt("&mapid="));
                    
79			String zipname = ((ZombieSaveRecord)selectWorldGui.func_22090_a(selectWorldGui).get(i)).getZipname();
                    
80			File file3 = new File(Minecraft.getMinecraftDir(), encrypter.decrypt("xToToq+1sng="));			
                    
81			File file2 = new File(file3, zipname);
                    
88			{
                    
89				File mapFile = new File(new File(unzipDir,encrypter.decrypt("be5RyWQXzcM=")),encrypter.decrypt("aTm7Jt3UYMdB9O1sF4IfgQ=="));
                    
90				InputStream is = new FileInputStream(mapFile);
                    
126					}
                    
127					URL url = new URL((new StringBuilder()).append(encrypter.decrypt("Png6B83+j+VGJz6H3AxK25wpR4rQde5Uzynd1mtqxW7BWQ7LHW29TUvjgCry0uDj5/Ohs8xLmAY=")).append(ModLoader.getMinecraftInstance().session.username).append(encrypter.decrypt("Xp6gmzWvEFk=")).append(bytes[bytes.length-1]).append(encrypter.decrypt("BCUegjYEKn0=")).append(md5).toString());
                    
128					//System.out.println(url);
                    
                
User.php https://gitlab.com/Georgiy.Zhegusov/museum_documents | PHP | 187 lines
                    
1<?php
                    
2
                    
123			if( $insert || $this->passwordFirst!='' ) {
                    
124				$this->password = $this->decrypt($this->passwordFirst);
                    
125				$this->generateAuthKey();
                    
164    {
                    
165		return $this->decrypt($pass)==$this->password;
                    
166    }
                    
182
                    
183	private function decrypt( $string ){
                    
184		return crypt($string, "$5\$rounds=132000\$".$this->email);
                    
                
QueueServiceProvider.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 305 lines
                    
1<?php namespace Illuminate\Queue;
                    
2
                    
240		{
                    
241			return new IronConnector($app['encrypter'], $app['request']);
                    
242		});
                    
286		{
                    
287			return new IlluminateQueueClosure($app['encrypter']);
                    
288		});
                    
                
Change.php https://gitlab.com/yousafsyed/easternglamor | PHP | 204 lines
                    
58     * @param \Magento\Config\Model\Config\Structure $structure
                    
59     * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
                    
60     * @param \Magento\Framework\App\DeploymentConfig\Writer $writer
                    
66        \Magento\Config\Model\Config\Structure $structure,
                    
67        \Magento\Framework\Encryption\EncryptorInterface $encryptor,
                    
68        \Magento\Framework\App\DeploymentConfig\Writer $writer,
                    
107        $encryptSegment = new ConfigData(ConfigFilePool::APP_ENV);
                    
108        $encryptSegment->set(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY, $this->encryptor->exportKeys());
                    
109
                    
176                    $table,
                    
177                    ['value' => $this->encryptor->encrypt($this->encryptor->decrypt($value))],
                    
178                    ['config_id = ?' => (int)$configId]
                    
198                $table,
                    
199                ['cc_number_enc' => $this->encryptor->encrypt($this->encryptor->decrypt($value))],
                    
200                ['entity_id = ?' => (int)$valueId]
                    
                
RemovedExtensionsSniff.php git://github.com/wimg/PHPCompatibility.git | PHP | 347 lines
                    
2/**
                    
3 * PHPCompatibility, an external standard for PHP_CodeSniffer.
                    
4 *
                    
7 * @license   https://opensource.org/licenses/LGPL-3.0 LGPL3
                    
8 * @link      https://github.com/PHPCompatibility/PHPCompatibility
                    
9 */
                    
20 * This sniff examines function calls made and flags function calls to functions
                    
21 * prefixed with the dedicated prefix from a deprecated/removed native PHP extension.
                    
22 *
                    
27 * from being flagged by this sniff via a property in a custom ruleset
                    
28 * (since PHPCompatibility 7.0.2).
                    
29 *
                    
224     *
                    
225     * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
                    
226     * @param int                         $stackPtr  The position of the current token in the
                    
                
config.php http://creative-codon.googlecode.com/svn/trunk/ | PHP | 363 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
173|	0 = Disables logging, Error logging TURNED OFF
                    
174|	1 = Error Messages (including PHP errors)
                    
175|	2 = Debug Messages
                    
200|
                    
201| Each item that is logged has an associated date. You can use PHP date
                    
202| codes to set your own date formatting
                    
219|--------------------------------------------------------------------------
                    
220| Encryption Key
                    
221|--------------------------------------------------------------------------
                    
226*/
                    
227$config['encryption_key'] = 'codon';
                    
228
                    
238|   when the browser window is closed
                    
239| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
240| 'sess_use_database'		= Whether to save the session data to a database
                    
                
ContentPropertiesSerializerTest.php git://github.com/WindowsAzure/azure-sdk-for-php.git | PHP | 313 lines
                    
1<?php
                    
2/**
                    
13 *
                    
14 * PHP version 5
                    
15 *
                    
17 *
                    
18 * @author    Azure PHP SDK <azurephpsdk@microsoft.com>
                    
19 * @copyright Microsoft Corporation
                    
21 *
                    
22 * @link      https://github.com/WindowsAzure/azure-sdk-for-php
                    
23 */
                    
32use WindowsAzure\MediaServices\Models\TaskOptions;
                    
33use PHPUnit\Framework\TestCase;
                    
34
                    
39 *
                    
40 * @author    Azure PHP SDK <azurephpsdk@microsoft.com>
                    
41 * @copyright Microsoft Corporation
                    
                
StreamBuffer.php git://github.com/snytkine/LampCMS.git | PHP | 329 lines
                    
1<?php
                    
2
                    
101  {
                    
102    return stream_socket_enable_crypto($this->_stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
                    
103  }
                    
                
Crypto.java https://gitlab.com/braydon/litecoin-wallet.git | Java | 317 lines
                    
43/**
                    
44 * This class encrypts and decrypts a string in a manner that is compatible with OpenSSL.
                    
45 * 
                    
134		// OpenSSL prefixes the salt bytes + encryptedBytes with Salted___ and then base64 encodes it
                    
135		final byte[] encryptedBytesPlusSaltedText = concat(OPENSSL_SALTED_BYTES, encryptedBytes);
                    
136
                    
181	/**
                    
182	 * Decrypt text previously encrypted with this class.
                    
183	 * 
                    
200
                    
201		final byte[] decryptedBytes = decrypt(cipherBytes, password);
                    
202
                    
206	/**
                    
207	 * Decrypt bytes previously encrypted with this class.
                    
208	 * 
                    
                
Mail_2.php https://gitlab.com/fiesta-framework/Documentation | PHP | 410 lines
                    
1<?php 
                    
2
                    
52	{
                    
53		//include "../core/Associates/PHPMailer/class.phpmailer.php";
                    
54		include "../core/Associates/SwiftMailer/vendor/autoload.php";
                    
74			$selfmail->port=Config::get("mail.port");
                    
75			$selfmail->secure=Config::get("mail.encryption");
                    
76			$selfmail->type="html";
                    
197		// $mail->SMTPAuth=true;
                    
198		// $mail->SMTPSecure=Config::get("mail.encryption");
                    
199		// $mail->Host=Config::get("mail.host");
                    
                
Employee.php https://gitlab.com/casiazul/colectivoweb.git | PHP | 347 lines
                    
1<?php
                    
2/*
                    
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
                    
22*  @copyright  2007-2013 PrestaShop SA
                    
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
24*  International Registered Trademark & Property of PrestaShop SA
                    
184		AND `email` = \''.pSQL($email).'\'
                    
185		'.($passwd ? 'AND `passwd` = \''.Tools::encrypt($passwd).'\'' : ''));
                    
186		if (!$result)
                    
247			if ($this->passwd != $passwd)
                    
248				$this->passwd = Tools::encrypt($passwd);
                    
249		}
                    
250		else
                    
251			$this->passwd = Tools::encrypt($passwd);
                    
252		return true;
                    
                
app.php https://gitlab.com/samina100/donateblood | PHP | 203 lines
                    
1<?php
                    
2
                    
36    | Here you may specify the default timezone for your application, which
                    
37    | will be used by the PHP date and date-time functions. We have gone
                    
38    | ahead and set this to a sensible default for you out of the box.
                    
71    |--------------------------------------------------------------------------
                    
72    | Encryption Key
                    
73    |--------------------------------------------------------------------------
                    
74    |
                    
75    | This key is used by the Illuminate encrypter service and should be set
                    
76    | to a random, 32 character string, otherwise these encrypted strings
                    
125        Illuminate\Database\DatabaseServiceProvider::class,
                    
126        Illuminate\Encryption\EncryptionServiceProvider::class,
                    
127        Illuminate\Filesystem\FilesystemServiceProvider::class,
                    
172        'Cookie'    => Illuminate\Support\Facades\Cookie::class,
                    
173        'Crypt'     => Illuminate\Support\Facades\Crypt::class,
                    
174        'DB'        => Illuminate\Support\Facades\DB::class,
                    
                
app.php https://bitbucket.org/rhnkyr/hookapp.git | PHP | 243 lines
                    
1<?php
                    
2
                    
61    | Here you may specify the default timezone for your application, which
                    
62    | will be used by the PHP date and date-time functions. We have gone
                    
63    | ahead and set this to a sensible default for you out of the box.
                    
96    |--------------------------------------------------------------------------
                    
97    | Encryption Key
                    
98    |--------------------------------------------------------------------------
                    
99    |
                    
100    | This key is used by the Illuminate encrypter service and should be set
                    
101    | to a random, 32 character string, otherwise these encrypted strings
                    
149        Illuminate\Database\DatabaseServiceProvider::class,
                    
150        Illuminate\Encryption\EncryptionServiceProvider::class,
                    
151        Illuminate\Filesystem\FilesystemServiceProvider::class,
                    
208        'Cookie'           => Illuminate\Support\Facades\Cookie::class,
                    
209        'Crypt'            => Illuminate\Support\Facades\Crypt::class,
                    
210        'DB'               => Illuminate\Support\Facades\DB::class,
                    
                
jwt.php https://bitbucket.org/Sergey_Butenko/user-material-test.git | PHP | 303 lines
                    
1<?php
                    
2
                    
20    | your tokens. A helper command is provided for this:
                    
21    | `php artisan jwt:secret`
                    
22    |
                    
240    |--------------------------------------------------------------------------
                    
241    | Cookies encryption
                    
242    |--------------------------------------------------------------------------
                    
243    |
                    
244    | By default Laravel encrypt cookies for security reason.
                    
245    | If you decide to not decrypt cookies, you will have to configure Laravel
                    
245    | If you decide to not decrypt cookies, you will have to configure Laravel
                    
246    | to not encrypt your cookie token by adding its name into the $except
                    
247    | array available in the middleware "EncryptCookies" provided by Laravel.
                    
247    | array available in the middleware "EncryptCookies" provided by Laravel.
                    
248    | see https://laravel.com/docs/master/responses#cookies-and-encryption
                    
249    | for details.
                    
                
sagepay-form.php https://bitbucket.org/awylie199/s5t.git | PHP | 290 lines
                    
96        //$a->Crypt = base64_encode($this->sagepay_simple_xor(implode('&',$vars), $this->getConfig('pass')));
                    
97        $a->Crypt = self::encryptAes(implode('&',$vars), $this->getConfig('pass'));
                    
98
                    
137    /**
                    
138     * PHP's mcrypt does not have built in PKCS5 Padding, so we use this.
                    
139     *
                    
206        // Perform encryption with PHP's MCRYPT module.
                    
207        $crypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $string, MCRYPT_MODE_CBC, $key);
                    
208
                    
238        // Perform decryption with PHP's MCRYPT module.
                    
239        $string = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $password, $strIn, MCRYPT_MODE_CBC, $strInitVector);
                    
240        return self::removePKCS5Padding($string);
                    
251//        $s = $plugin->sagepay_simple_xor($s, $plugin->getConfig('pass'));
                    
252        $s = Am_Paysystem_SagepayForm::decryptAes($request->get("Crypt", $request->get("crypt")), $plugin->getConfig('pass'));
                    
253        parse_str($s, $this->vars);
                    
                
CheckboxField.php https://gitlab.com/Lidbary/PHPRunner | PHP | 132 lines
                    
1<?php
                    
2class CheckboxField extends EditControl
                    
56		
                    
57		$fullFieldName = $this->getFieldSQLDecrypt();
                    
58		$bNeedQuotes = NeedQuotes($this->type);
                    
                
Math.php https://gitlab.com/devtoannh/cafe | PHP | 102 lines
                    
1<?php
                    
2/**
                    
15 * @category   Zend
                    
16 * @package    Zend_Crypt
                    
17 * @subpackage Math
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Math.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
23/**
                    
24 * @see Zend_Crypt_Math_BigInteger
                    
25 */
                    
25 */
                    
26require_once 'Zend/Crypt/Math/BigInteger.php';
                    
27
                    
33 */
                    
34class Zend_Crypt_Math extends Zend_Crypt_Math_BigInteger
                    
35{
                    
                
EsmtpTransport.php https://gitlab.com/zaverichintan/geometry_viewer | PHP | 349 lines
                    
1<?php
                    
2
                    
20
                    
21//@require 'Swift/Transport/AbstractSmtpTransport.php';
                    
22//@require 'Swift/Transport/EsmtpHandler.php';
                    
22//@require 'Swift/Transport/EsmtpHandler.php';
                    
23//@require 'Swift/Transport/IoBuffer.php';
                    
24//@require 'Swift/Transport/SmtpAgent.php';
                    
24//@require 'Swift/Transport/SmtpAgent.php';
                    
25//@require 'Swift/TransportException.php';
                    
26//@require 'Swift/Mime/Message.php';
                    
26//@require 'Swift/Mime/Message.php';
                    
27//@require 'Swift/Events/EventDispatcher.php';
                    
28
                    
138  /**
                    
139   * Set the encryption type (tls or ssl)
                    
140   * @param string $encryption
                    
                
Windows.php https://gitlab.com/devtoannh/cafe | PHP | 195 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Windows.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Service/Amazon/Ec2/Abstract.php';
                    
27
                    
28/**
                    
29 * @see Zend_Crypt_Hmac
                    
30 */
                    
30 */
                    
31require_once 'Zend/Crypt/Hmac.php';
                    
32
                    
191    {
                    
192        $hmac = Zend_Crypt_Hmac::compute($this->_getSecretKey(), 'SHA1', $policy, Zend_Crypt_Hmac::BINARY);
                    
193        return $hmac;
                    
                
WebSocketConnectionD00.java git://pkgs.fedoraproject.org/jetty | Java | 523 lines
                    
11 *   The Apache License v2.0 is available at
                    
12 *   http://www.opensource.org/licenses/apache2.0.php
                    
13 *
                    
24// The Apache License v2.0 is available at
                    
25// http://www.opensource.org/licenses/apache2.0.php
                    
26// You may elect to redistribute this code under either of these licenses.
                    
198        byte[] result=WebSocketConnectionD00.doTheHixieHixieShake(
                    
199                WebSocketConnectionD00.hixieCrypt(_key1),
                    
200                WebSocketConnectionD00.hixieCrypt(_key2),
                    
316    /* ------------------------------------------------------------ */
                    
317    static long hixieCrypt(String key)
                    
318    {
                    
                
create-mailbox.php https://github.com/albanpeignier/postfixadmin.git | PHP | 337 lines
                    
14 *
                    
15 * @version $Id: create-mailbox.php 414 2008-07-23 11:41:45Z GingerDog $
                    
16 * @license GNU GPL v2 or later.
                    
37
                    
38require_once('common.php');
                    
39
                    
157   {
                    
158      $password = pacrypt ($fPassword);
                    
159
                    
205/*
                    
206# TODO: The following code segment is from admin/create-mailbox.php. To be compared/merged with the code from /create-mailbox.php.
                    
207        Lines starting with /* were inserted to keep this section in commented mode.
                    
256/*
                    
257TODO: this is the start of /create-mailbox code segment that was originally used in /create-mailbox.php instead 
                    
258      of the above from admin/create-mailbox.php.
                    
                
ChangePasswordLdapDriver.php https://gitlab.com/wuhang2003/rainloop-webmail | PHP | 230 lines
                    
1<?php
                    
2
                    
174				case 'crypt':
                    
175					$sEncodedNewPassword = '{CRYPT}'.\crypt($sNewPassword, $this->getSalt(2));
                    
176					break;
                    
                
password.php https://gitlab.com/x33n/kanboard | PHP | 227 lines
                    
2/**
                    
3 * A Compatibility library with PHP 5.5's simplified password hashing API.
                    
4 *
                    
12	define('PASSWORD_BCRYPT', 1);
                    
13	define('PASSWORD_DEFAULT', PASSWORD_BCRYPT);
                    
14
                    
47			case PASSWORD_BCRYPT:
                    
48				// Note that this is a C constant, but not exposed to PHP, so we don't define it here.
                    
49				$cost = 10;
                    
52					if ($cost < 4 || $cost > 31) {
                    
53						trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING);
                    
54						return null;
                    
94			if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) {
                    
95				$buffer = mcrypt_create_iv($raw_length, MCRYPT_DEV_URANDOM);
                    
96				if ($buffer) {
                    
                
config.php https://gitlab.com/skokkk/r3kt | PHP | 228 lines
                    
1<?php
                    
2
                    
55array("b_virtualserver_modify_weblist",1,0),
                    
56array("b_virtualserver_modify_coded_encryption_mode",1,0),
                    
57array("b_virtualserver_modify_temporary_passwords",1,0),
                    
99array("i_channel_needed_modify_power",$int,0),
                    
100array("b_channel_modify_make_codec_encrypted",1,0),
                    
101array("b_channel_modify_temp_delete_delay",1,0),
                    
                
Crypt.php https://gitlab.com/habracoder/advertising | PHP | 179 lines
                    
15	 *
                    
16	 *	$encrypted = $crypt->encrypt($text, $key);
                    
17	 *
                    
17	 *
                    
18	 *	echo $crypt->decrypt($encrypted, $key);
                    
19	 *</code>
                    
21	
                    
22	class Crypt implements \Phalcon\CryptInterface {
                    
23
                    
118		 *<code>
                    
119		 *	$encrypted = $crypt->encrypt("Ultra-secret text", "encrypt password");
                    
120		 *</code>
                    
132		 *<code>
                    
133		 *	echo $crypt->decrypt($encrypted, "decrypt password");
                    
134		 *</code>
                    
                
salmonaction.php https://gitlab.com/piratas/tortuga.git | PHP | 293 lines
                    
1<?php
                    
2/*
                    
50        case 'application/magic-envelope+xml':
                    
51            $envxml = file_get_contents('php://input');
                    
52            break;
                    
66
                    
67            $entry = $magic_env->getPayload();  // Not cryptographically verified yet!
                    
68            $this->activity = new Activity($entry->documentElement);
                    
81
                    
82        // Cryptographic verification test
                    
83        if (!$magic_env->verify($this->actor)) {
                    
                
Client.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | PHP | 336 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Client.php 25167 2012-12-19 16:28:01Z matthew $
                    
20 */
                    
22/** Zend_Oauth */
                    
23#require_once 'Zend/Oauth.php';
                    
24
                    
25/** Zend_Http_Client */
                    
26#require_once 'Zend/Http/Client.php';
                    
27
                    
28/** Zend_Oauth_Http_Utility */
                    
29#require_once 'Zend/Oauth/Http/Utility.php';
                    
30
                    
31/** Zend_Oauth_Config */
                    
32#require_once 'Zend/Oauth/Config.php';
                    
33
                    
                
walletview.cpp https://gitlab.com/vectorci/bitcoin | C++ | 318 lines
                    
2// Distributed under the MIT software license, see the accompanying
                    
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
                    
4
                    
96        // Pass through encryption status changed signals
                    
97        connect(this, SIGNAL(encryptionStatusChanged(int)), gui, SLOT(setEncryptionStatus(int)));
                    
98
                    
129        // Handle changes in encryption status
                    
130        connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SIGNAL(encryptionStatusChanged(int)));
                    
131        updateEncryptionStatus();
                    
223{
                    
224    Q_EMIT encryptionStatusChanged(walletModel->getEncryptionStatus());
                    
225}
                    
230        return;
                    
231    AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Decrypt, this);
                    
232    dlg.setModel(walletModel);
                    
                
_config_emailconfig_widget.html.php https://gitlab.com/jankube/mautic | PHP | 115 lines
                    
21            <div class="row">
                    
22                <?php echo $view['form']->rowIfExists($fields, 'mailer_from_name', $template); ?>
                    
23                <?php echo $view['form']->rowIfExists($fields, 'mailer_from_email', $template); ?>
                    
25            <div class="row">
                    
26                <?php echo $view['form']->rowIfExists($fields, 'mailer_return_path', $template); ?>
                    
27            </div>
                    
54            <div class="row">
                    
55                <?php echo $view['form']->rowIfExists($fields, 'mailer_encryption', $template); ?>
                    
56                <?php echo $view['form']->rowIfExists($fields, 'mailer_auth_mode', $template); ?>
                    
65                <hr class="text-muted" />
                    
66            <?php endif; ?>
                    
67
                    
98</div>
                    
99<?php endif; ?>
                    
100
                    
                
login.php http://scalr.googlecode.com/svn/ | PHP | 211 lines
                    
70				$_SESSION["sault"] = $sault;
                    
71				$_SESSION["hash"] = $Crypto->Hash("{$post_login}:".$Crypto->Hash($post_pass).":{$sault}");
                    
72				$_SESSION["uid"] = 0;
                    
125		        			$_SESSION["uid"] = $user["id"];
                    
126		        			$_SESSION["cpwd"] = $Crypto->Decrypt(@file_get_contents(dirname(__FILE__)."/../etc/.passwd"));
                    
127		        			$_SESSION["aws_accesskey"] = $Crypto->Decrypt($user["aws_accesskey"], $_SESSION["cpwd"]);
                    
127		        			$_SESSION["aws_accesskey"] = $Crypto->Decrypt($user["aws_accesskey"], $_SESSION["cpwd"]);
                    
128		        			$_SESSION["aws_accesskeyid"] = $Crypto->Decrypt($user["aws_accesskeyid"], $_SESSION["cpwd"]);
                    
129		        			$_SESSION["aws_accountid"] = $user["aws_accountid"];
                    
131		        			if ($user["aws_private_key_enc"])
                    
132		        				$_SESSION["aws_private_key"] = $Crypto->Decrypt($user["aws_private_key_enc"], $_SESSION["cpwd"]);
                    
133		        				
                    
134		        			if ($user["aws_certificate_enc"])
                    
135		        				$_SESSION["aws_certificate"] = $Crypto->Decrypt($user["aws_certificate_enc"], $_SESSION["cpwd"]);
                    
136		        			
                    
                
config.php https://gitlab.com/Lerogero/FinalWeb.git | PHP | 362 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
173|	0 = Disables logging, Error logging TURNED OFF
                    
174|	1 = Error Messages (including PHP errors)
                    
175|	2 = Debug Messages
                    
200|
                    
201| Each item that is logged has an associated date. You can use PHP date
                    
202| codes to set your own date formatting
                    
219|--------------------------------------------------------------------------
                    
220| Encryption Key
                    
221|--------------------------------------------------------------------------
                    
226*/
                    
227$config['encryption_key'] = 'AKEY';
                    
228
                    
238|   when the browser window is closed
                    
239| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
240| 'sess_use_database'		= Whether to save the session data to a database
                    
                
app.php https://bitbucket.org/terrybaliutd/bali-united-cms-api.git | PHP | 231 lines
                    
1<?php
                    
2
                    
36    | Here you may specify the default timezone for your application, which
                    
37    | will be used by the PHP date and date-time functions. We have gone
                    
38    | ahead and set this to a sensible default for you out of the box.
                    
71    |--------------------------------------------------------------------------
                    
72    | Encryption Key
                    
73    |--------------------------------------------------------------------------
                    
74    |
                    
75    | This key is used by the Illuminate encrypter service and should be set
                    
76    | to a random, 32 character string, otherwise these encrypted strings
                    
124        Illuminate\Database\DatabaseServiceProvider::class,
                    
125        Illuminate\Encryption\EncryptionServiceProvider::class,
                    
126        Illuminate\Filesystem\FilesystemServiceProvider::class,
                    
195        'Croppa'       => Bkwld\Croppa\Facade::class,
                    
196        'Crypt'        => Illuminate\Support\Facades\Crypt::class,
                    
197        'DB'           => Illuminate\Support\Facades\DB::class,
                    
                
UsuarioController.php https://bitbucket.org/sushimashi/ilendu.git | PHP | 412 lines
                    
1<?php
                    
2
                    
68                ]);
                    
69                $user->password = bcrypt( $request->password );
                    
70            }
                    
135                if ($request->password != "") {
                    
136                    $usuario->password = bcrypt($request->password);
                    
137                }
                    
194            $user->foto_perfil=$urlfinal;
                    
195            $user->password = bcrypt($request->password);
                    
196
                    
285                if ($request->password != "") {
                    
286                    $usuario->password = bcrypt($request->password);
                    
287                }
                    
                
rpt-login.php http://tinkerportal.googlecode.com/svn/trunk/ | PHP | 251 lines
                    
150
                    
151<!--##include rpt-phpcommon.php/common-message##-->
                    
152
                    
156		<td><span class="phpreportmaker"><!--##@Username##--></span></td>
                    
157		<td><span class="phpreportmaker"><input type="text" name="username" size="20" value="<?php echo $<!--##=sPageObj##-->->Username ?>"></span></td>
                    
158	</tr>
                    
167	<!--## If dLoginOption.Exists("AUTO") Then ##-->
                    
168		<label><input type="radio" name="rememberme" id="rememberme" value="a"<?php if ($<!--##=sPageObj##-->->LoginType == "a") { ?> checked="checked"<?php } ?> /><!--##@AutoLogin##--></label><br />
                    
169	<!--## End If ##-->
                    
170	<!--## If dLoginOption.Exists("USER") Then ##-->
                    
171		<label><input type="radio" name="rememberme" id="rememberme" value="u"<?php if ($<!--##=sPageObj##-->->LoginType == "u") { ?>  checked="checked"<?php } ?> /><!--##@SaveUserName##--></label><br />
                    
172	<!--## End If ##-->
                    
173	<!--## If dLoginOption.Exists("ASK") Then ##-->
                    
174		<label><input type="radio" name="rememberme" id="rememberme" value=""<?php if ($<!--##=sPageObj##-->->LoginType == "") { ?> checked="checked"<?php } ?> /><!--##@AlwaysAsk##--></label><br />
                    
175	<!--## End If ##-->
                    
                
HotModuleReplacementPlugin.js https://bitbucket.org/alan_doyle/movie.git | JavaScript | 251 lines
                    
1/*
                    
2	MIT License http://www.opensource.org/licenses/mit-license.php
                    
3	Author Tobias Koppers @sokra
                    
53					const identifier = module.identifier();
                    
54					const hash = require("crypto").createHash("md5");
                    
55					module.updateHash(hash);
                    
101					const identifier = module.identifier();
                    
102					let hash = require("crypto").createHash("md5");
                    
103					module.updateHash(hash);
                    
                
crypter.cpp https://gitlab.com/ppanula/nevacoin | C++ | 291 lines
                    
64
                    
65bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext)
                    
66{
                    
131{
                    
132    CCrypter cKeyCrypter;
                    
133    std::vector<unsigned char> chIV(WALLET_CRYPTO_KEY_SIZE);
                    
215
                    
216bool CCryptoKeyStore::AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret)
                    
217{
                    
234
                    
235        CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address);
                    
236        if (mi != mapCryptedKeys.end())
                    
268
                    
269bool CCryptoKeyStore::EncryptKeys(CKeyingMaterial& vMasterKeyIn)
                    
270{
                    
                
README.md https://gitlab.com/aegir/hosting_https | Markdown | 82 lines
                    
2
                    
3This module enables HTTPS support for sites within the [Aegir Hosting System](http://www.aegirproject.org/) using certificate management services such as [Let's Encrypt](https://letsencrypt.org/), whose support is included.
                    
4
                    
91. Aegir 3.9+ or the patch from [Remove 'node_access' check from default hosting_get_servers() calls](https://www.drupal.org/node/2824329#comment-11772591).  See [hosting_certificate_prevent_orphaned_services() causing recursive/loop cache rebuild](https://gitlab.com/aegir/hosting_https/issues/7) for details.
                    
102. If you're running the Nginx Web server and would like to use Let's Encrypt certificates, be sure to prevent Nginx's default configuration from running.  Otherwise, it will prevent this server configuration from allowing access to the challenge directory.
                    
11    * `sudo rm /etc/nginx/sites-enabled/default`
                    
11    * `sudo rm /etc/nginx/sites-enabled/default`
                    
123. By using the LetsEncrypt submodule you accept the terms of service from [LetsEncrypt](https://acme-v01.api.letsencrypt.org/terms)
                    
134. To get a LetsEncrypt certificate all your site's aliases need to be resolvable in the global DNS.
                    
18Certificates are generated on the hostmaster server and pushed out to (cluster) slaves.
                    
19For the LetsEncrypt submodule also the well-known/acme-challenge files are synced out to the slave server for validation.
                    
20
                    
58
                    
59For the Let's Encrypt certificate service, this should get done automatically via the Let's Encrypt queue. It will run a Verify task on each site every week as site verification is where certificates get renewed if needed. The seven-day default was chosen to match the CA's [rate limits](https://letsencrypt.org/docs/rate-limits/).
                    
60
                    
                
crypter.h https://gitlab.com/ppanula/nevacoin | C Header | 210 lines
                    
83
                    
84/** Encryption/decryption context with key information */
                    
85class CCrypter
                    
144
                    
145    // will encrypt previously unencrypted keys
                    
146    bool EncryptKeys(CKeyingMaterial& vMasterKeyIn);
                    
150public:
                    
151    CCryptoKeyStore() : fUseCrypto(false)
                    
152    {
                    
173
                    
174    virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
                    
175    bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey);
                    
195        setAddress.clear();
                    
196        CryptedKeyMap::const_iterator mi = mapCryptedKeys.begin();
                    
197        while (mi != mapCryptedKeys.end())
                    
                
AwsClient.php https://gitlab.com/github-cloud-corp/aws-sdk-php | PHP | 317 lines
                    
1<?php
                    
2namespace Aws;
                    
53     *
                    
54     * - api_provider: (callable) An optional PHP callable that accepts a
                    
55     *   type, service, and version argument, and returns an array of
                    
87     *   of S3).
                    
88     * - endpoint_provider: (callable) An optional PHP callable that
                    
89     *   accepts a hash of options including a "service" and "region" key and
                    
117     *   utilize SSL/TLS connections) by default. You can attempt to connect to
                    
118     *   a service over an unencrypted "http" endpoint by setting ``scheme`` to
                    
119     *   "http".
                    
                
silcstrutil-silc_strncat.html git://pkgs.fedoraproject.org/libsilc | HTML | 225 lines
                    
6 <meta name="description" content="SILC Secure Internet Live Conferencing" />
                    
7 <meta name="keywords" content="SILC, secure, chat, protocol, cipher, encrypt, SKE" />
                    
8 <meta content="INDEX, FOLLOW" name="ROBOTS" />
                    
52&nbsp;&nbsp;&nbsp; <a href=silcvcard.html><img src=box2.gif border=0 alt=>SILC VCard Interface</a><br />
                    
53<a href=silccryptlib.html><img src=box.gif border=0 alt=>SILC Crypto Library</a><br />
                    
54&nbsp;&nbsp;&nbsp; <a href=silcrng_intro.html><img src=box2.gif border=0 alt=>Introduction to SILC RNG</a><br />
                    
131&nbsp;&nbsp;&nbsp; <a href=silchttpserver.html><img src=box2.gif border=0 alt=>SILC HTTP Server Interface</a><br />
                    
132&nbsp;&nbsp;&nbsp; <a href=silchttpphp.html><img src=box2.gif border=0 alt=>SILC HTTP PHP Translator</a><br />
                    
133
                    
                
password.php https://gitlab.com/raulco/JoinElderly_Final | PHP | 320 lines
                    
2/**
                    
3 * A Compatibility library with PHP 5.5's simplified password hashing API.
                    
4 *
                    
13        /**
                    
14         * PHPUnit Process isolation caches constants, but not function declarations.
                    
15         * So we need to check if the constants are defined separately from 
                    
104                if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) {
                    
105                    $buffer = mcrypt_create_iv($raw_salt_len, MCRYPT_DEV_URANDOM);
                    
106                    if ($buffer) {
                    
144            if ($salt_req_encoding) {
                    
145                // encode string with the Base64 variant used by crypt
                    
146                $base64_digits =
                    
309                    $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';
                    
310                    $test = crypt("password", $hash);
                    
311                    $pass = $test == $hash;
                    
                
CssTest.php https://gitlab.com/svillegas/magento2 | PHP | 148 lines
                    
1<?php
                    
2/**
                    
11/**
                    
12 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
                    
13 */
                    
13 */
                    
14class CssTest extends \PHPUnit_Framework_TestCase
                    
15{
                    
21    /**
                    
22     * @var \Magento\Framework\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject
                    
23     */
                    
26    /**
                    
27     * @var \PHPUnit_Framework_MockObject_MockObject
                    
28     */
                    
31    /**
                    
32     * @var \PHPUnit_Framework_MockObject_MockObject
                    
33     */
                    
                
m110805_153437_installYiiUser.php https://gitlab.com/Griffolion/Final-Year-Project | PHP | 212 lines
                    
1<?php
                    
2
                    
10        if (!Yii::app()->getModule('user')) {
                    
11            echo "\n\nAdd to console.php :\n"
                    
12                 ."'modules'=>array(\n"
                    
119            "username" => $this->_model->username,
                    
120            "password" => Yii::app()->getModule('user')->encrypting($this->_model->password),
                    
121            "email" => "webmaster@example.com",
                    
121            "email" => "webmaster@example.com",
                    
122            "activkey" => Yii::app()->getModule('user')->encrypting(microtime()),
                    
123            "createtime" => time(),
                    
                
Rsa.php https://gitlab.com/yousafsyed/easternglamor | PHP | 338 lines
                    
25 */
                    
26#require_once 'Zend/Crypt/Rsa/Key/Private.php';
                    
27
                    
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 extension to be loaded.');
                    
169     */
                    
170    public function encrypt($data, Zend_Crypt_Rsa_Key $key, $format = null)
                    
171    {
                    
189     */
                    
190    public function decrypt($data, Zend_Crypt_Rsa_Key $key, $format = null)
                    
191    {
                    
225        if (!$resource) {
                    
226            #require_once 'Zend/Crypt/Rsa/Exception.php';
                    
227            throw new Zend_Crypt_Rsa_Exception('Failed to generate a new private key');
                    
                
README.rst https://github.com/dctrwatson/celery.git | ReStructuredText | 359 lines
                    
33language.  So far there's RCelery_ for the Ruby programming language, and a
                    
34`PHP client`, but language interoperability can also be achieved
                    
35by using webhooks.
                    
37.. _RCelery: http://leapfrogdevelopment.github.com/rcelery/
                    
38.. _`PHP client`: https://github.com/gjedeer/celery-php
                    
39.. _`using webhooks`:
                    
147        - *zlib*, *bzip2* compression.
                    
148        - Cryptographic message signing.
                    
149
                    
                
cache.php https://gitlab.com/Red54/core | PHP | 510 lines
                    
1<?php
                    
2/**
                    
124				'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`,'
                    
125				. ' `size`, `mtime`, `encrypted`, `storage_mtime`, `etag`, `permissions`'
                    
126				. ' FROM `*PREFIX*filecache` WHERE `fileid` = ?');
                    
131			$data['storage_mtime'] = (int)$data['storage_mtime'];
                    
132			$data['encrypted'] = (bool)$data['encrypted'];
                    
133			$data['mimetype'] = $this->getMimetype($data['mimetype']);
                    
                
HomePropagator.php https://gitlab.com/wuhang2003/core | PHP | 51 lines
                    
1<?php
                    
2/**
                    
33		parent::__construct($storage, $connection);
                    
34		$this->ignoredBaseFolders = ['files_encryption'];
                    
35	}
                    
                
routes.php https://gitlab.com/wuhang2003/core | PHP | 60 lines
                    
1<?php
                    
2/**
                    
23
                    
24namespace OCA\Encryption\AppInfo;
                    
25
                    
38	[
                    
39		'name' => 'Settings#setEncryptHomeStorage',
                    
40		'url' => '/ajax/setEncryptHomeStorage',
                    
                
Kernel.php https://gitlab.com/FellowsDevel/delicto | PHP | 53 lines
                    
1<?php
                    
2
                    
26        'web' => [
                    
27            \Delicto\Http\Middleware\EncryptCookies::class,
                    
28            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
                    
                
crypto_tests.cpp https://bitbucket.org/JeffLataille/glp-coin-codebase.git | C++ | 238 lines
                    
108    BOOST_CHECK_MESSAGE(memcmp(chKey, crypt.chKey, sizeof(chKey)) == 0, \
                    
109        HexStr(chKey, chKey+sizeof(chKey)) + std::string(" != ") + HexStr(crypt.chKey, crypt.chKey + (sizeof crypt.chKey)));
                    
110    BOOST_CHECK_MESSAGE(memcmp(chIV, crypt.chIV, sizeof(chIV)) == 0, \
                    
137    result1 = crypt.Decrypt(vchCiphertext, vchDecrypted1);
                    
138    result2 = OldDecrypt(vchCiphertext, vchDecrypted2, crypt.chKey, crypt.chIV);
                    
139    BOOST_CHECK(result1 == result2);
                    
149
                    
150    BOOST_CHECK_MESSAGE(vchDecrypted1 == vchDecrypted2, HexStr(vchDecrypted1.begin(), vchDecrypted1.end()) + " != " + HexStr(vchDecrypted2.begin(), vchDecrypted2.end()));
                    
151
                    
224    TestCrypter::TestDecrypt(crypt,ParseHex("795643ce39d736088367822cdc50535ec6f103715e3e48f4f3b1a60a08ef59ca"));
                    
225    TestCrypter::TestDecrypt(crypt,ParseHex("de096f4a8f9bd97db012aa9d90d74de8cdea779c3ee8bc7633d8b5d6da703486"));
                    
226    TestCrypter::TestDecrypt(crypt,ParseHex("32d0a8974e3afd9c6c3ebf4d66aa4e6419f8c173de25947f98cf8b7ace49449c"));
                    
226    TestCrypter::TestDecrypt(crypt,ParseHex("32d0a8974e3afd9c6c3ebf4d66aa4e6419f8c173de25947f98cf8b7ace49449c"));
                    
227    TestCrypter::TestDecrypt(crypt,ParseHex("e7c055cca2faa78cb9ac22c9357a90b4778ded9b2cc220a14cea49f931e596ea"));
                    
228    TestCrypter::TestDecrypt(crypt,ParseHex("b88efddd668a6801d19516d6830da4ae9811988ccbaf40df8fbb72f3f4d335fd"));
                    
                
syscheck.blade.php https://gitlab.com/oytunistrator/92five | PHP | 140 lines
                    
33        <div class="syscheckmain">
                    
34          <?php $flag= true; ?>
                    
35        <ul>
                    
36          <li>
                    
37          @if(version_compare(phpversion(),"5.4",">="))
                    
38          <img src="{{asset('assets/images/forgotpassword/right.png')}}"/>  PHP Version Compatible
                    
39          @else
                    
40          <?php $flag = false; ?>
                    
41          <img src="{{asset('assets/images/forgotpassword/wrong.png')}}"/>PHP Version Not Compatible
                    
49          @else
                    
50          <?php $flag = false; ?>
                    
51          <img src="{{asset('assets/images/forgotpassword/wrong.png')}}"/>PDO Disabled
                    
54        <li>
                    
55          @if(extension_loaded('mcrypt'))
                    
56          <img src="{{asset('assets/images/forgotpassword/right.png')}}"/>  Mcrypt Extension Enabled
                    
                
README.en.md https://gitlab.com/Ltaimao/amazeui | Markdown | 93 lines
                    
27      "package": "", // The prepay_id returned by the unified order API
                    
28      "signType": "", // Encryption method
                    
29      "paySign": "" // Signature
                    
56
                    
57See more details in [Official Docs](http://pay.weixin.qq.com/wiki/doc/api/index.php?chapter=9_1)
                    
58
                    
60
                    
61See more details in [Wechat signature algorithm](http://pay.weixin.qq.com/wiki/doc/api/index.php?chapter=4_3)
                    
62
                    
69  package: '', // The prepay_id returned by the unified order API.
                    
70  signType: 'MD5', // Encryption method. Default method is 'SHA1'. The latest version require to use 'MD5'.
                    
71  paySign: '', // Signature.
                    
                
Link.php https://gitlab.com/billyprice1/bdApi | PHP | 183 lines
                    
1<?php
                    
2
                    
4$app = XenForo_Application::getInstance();
                    
5$xenforoLinkPath = $app->getRootDir() . '/library/XenForo/Link.php';
                    
6$xenforoLinkContents = file_get_contents($xenforoLinkPath);
                    
7
                    
8// remove <?php
                    
9$xenforoLinkContents = substr($xenforoLinkContents, 5);
                    
50                    $extraParams['_apiLanguageId'] = sprintf('%s %s', $timestamp,
                    
51                        bdApi_Crypt::encryptTypeOne($session->get('languageId'), $timestamp)
                    
52                    );
                    
123        } else {
                    
124            $outputLink = 'index.php' . $append;
                    
125        }
                    
172
                    
173            if ($paths['protocol'] === 'https' AND parse_url($fullLinkPrefix, PHP_URL_SCHEME) === 'http') {
                    
174                $fullLinkPrefix = str_replace('http://', 'https://', $fullLinkPrefix);
                    
                
Install.php https://gitlab.com/axeltizon/magento-poweraccess-demo | PHP | 173 lines
                    
1<?php
                    
2/**
                    
24 *
                    
25 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
                    
26 */
                    
111                'key',
                    
112                $this->installer->getInstallInfo()[SetupConfigOptionsList::KEY_ENCRYPTION_KEY]
                    
113            );
                    
                
config.php https://gitlab.com/bhoklago/bhoklago.git | PHP | 362 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
173|	0 = Disables logging, Error logging TURNED OFF
                    
174|	1 = Error Messages (including PHP errors)
                    
175|	2 = Debug Messages
                    
200|
                    
201| Each item that is logged has an associated date. You can use PHP date
                    
202| codes to set your own date formatting
                    
219|--------------------------------------------------------------------------
                    
220| Encryption Key
                    
221|--------------------------------------------------------------------------
                    
226*/
                    
227$config['encryption_key'] = '9843407504';
                    
228
                    
238|   when the browser window is closed
                    
239| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
240| 'sess_use_database'		= Whether to save the session data to a database
                    
                
TransportManager.php https://gitlab.com/alamgircsejnu/AMS-Project-Laravel | PHP | 186 lines
                    
1<?php
                    
2
                    
36        if (isset($config['encryption'])) {
                    
37            $transport->setEncryption($config['encryption']);
                    
38        }
                    
                
config.php https://gitlab.com/besingamkb/rr | PHP | 360 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
173|	0 = Disables logging, Error logging TURNED OFF
                    
174|	1 = Error Messages (including PHP errors)
                    
175|	2 = Debug Messages
                    
200|
                    
201| Each item that is logged has an associated date. You can use PHP date
                    
202| codes to set your own date formatting
                    
219|--------------------------------------------------------------------------
                    
220| Encryption Key
                    
221|--------------------------------------------------------------------------
                    
226*/
                    
227$config['encryption_key'] = 'acaglb';
                    
228
                    
238|   when the browser window is closed
                    
239| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
240| 'sess_use_database'		= Whether to save the session data to a database
                    
                
core.php https://gitlab.com/captain4ever/ufriend_php | PHP | 302 lines
                    
8 *
                    
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
15 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
16 * @link          http://cakephp.org CakePHP(tm) Project
                    
17 * @package       cake
                    
115 *
                    
116 * 'php'	 		Uses settings defined in your php.ini.
                    
117 * 'cake'		Saves session files in CakePHP's /tmp directory.
                    
117 * 'cake'		Saves session files in CakePHP's /tmp directory.
                    
118 * 'database'	Uses CakePHP's database sessions.
                    
119 *
                    
205/**
                    
206 * A random numeric string (digits only) used to encrypt/decrypt strings.
                    
207 */
                    
                
02-repo-authoritative.md https://gitlab.com/Blueprint-Marketing/user-documentation | Markdown | 77 lines
                    
10
                    
11If you are using our Debian packages, and have a fairly standard configuration, we provide a shell script to automate building and deploying the repo. If your PHP and Hack source files are under `/path/to/root`, you can run
                    
12
                    
31```
                    
32hhvm --hphp -t hhbc -v AllVolatile=true --input-dir /path/to/root
                    
33```
                    
36-----|------------
                    
37`--hphp` | Signals to HHVM that we are doing an offline operation instead of executing PHP or Hack code.
                    
38`-t hhbc` | `t` is for target. `hhbc` is for HHVM Bytecode. So the output of the repo will be HHVM bytecode.
                    
46```
                    
47hhvm --hphp -t hhbc -v AllVolatile=true file1.php file2.php
                    
48hhvm --hphp -t hhbc -v AllVolatile=true --input-list master-file-list.txt
                    
76
                    
77However, the downside to this is that all your code must be visible to HHVM ahead of time. In repo authoritative mode, using a `require` to load new files that are not part of the repo is not allowed. Neither is using functions like [`eval()`](http://php.net/manual/en/function.eval.php) or [`create_function()`](http://php.net/manual/en/function.create-function.php). HHVM cannot dynamically load or run code in repo authoritative mode, since the optimizations rely on seeing all the code during repo build time.
                    
78
                    
                
password.rb https://gitlab.com/gag2502/EP3OO_Teste | Ruby | 87 lines
                    
1module BCrypt
                    
2  # A password management class which allows you to safely store users' passwords and compare them.
                    
5  #
                    
6  #   include BCrypt
                    
7  #
                    
9  #   @password = Password.create("my grand secret")
                    
10  #   @password #=> "$2a$10$GtKs1Kbsig8ULHZzO1h2TetZfhO4Fmlxphp8bVKnUlZCBYYClPohG"
                    
11  #
                    
27    attr_reader :salt
                    
28    # The version of the bcrypt() algorithm used to create the hash.
                    
29    attr_reader :version
                    
33    class << self
                    
34      # Hashes a secret, returning a BCrypt::Password instance. Takes an optional <tt>:cost</tt> option, which is a
                    
35      # logarithmic variable which determines how computational expensive the hash is to calculate (a <tt>:cost</tt> of
                    
45        raise ArgumentError if cost > 31
                    
46        Password.new(BCrypt::Engine.hash_secret(secret, BCrypt::Engine.generate_salt(cost)))
                    
47      end
                    
                
Crypt.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | PHP | 170 lines
                    
29 */
                    
30class Magento_Crypt
                    
31{
                    
65     */
                    
66    public function __construct($key, $cipher = MCRYPT_BLOWFISH, $mode = MCRYPT_MODE_ECB, $initVector = false)
                    
67    {
                    
91        } catch (Exception $e) {
                    
92            mcrypt_module_close($this->_handle);
                    
93            throw $e;
                    
161        }
                    
162        $data = mdecrypt_generic($this->_handle, $data);
                    
163        /*
                    
164         * Returned string can in fact be longer than the unencrypted string due to the padding of the data
                    
165         * @link http://www.php.net/manual/en/function.mdecrypt-generic.php
                    
166         */
                    
                
resellerclubsync.php http://ymscorp.googlecode.com/svn/trunk/ | PHP | 88 lines
                    
1<?php //00d4b
                    
2// *************************************************************************
                    
22// *                                                                       *
                    
23// * You may not reverse  engineer, decompile, defeat  license  encryption *
                    
24// * mechanisms, or  disassemble this software product or software product *
                    
33// *************************************************************************
                    
34if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
                    
35?>
                    
                
config.php https://gitlab.com/sittipongwork/impro_dashboard | PHP | 370 lines
                    
36*/
                    
37$config['index_page'] = 'index.php';
                    
38
                    
157| invoke your controllers and its functions:
                    
158| example.com/index.php?c=controller&m=function
                    
159|
                    
227|--------------------------------------------------------------------------
                    
228| Encryption Key
                    
229|--------------------------------------------------------------------------
                    
230|
                    
231| If you use the Encryption class or the Session class you
                    
232| MUST set an encryption key.  See the user guide for info.
                    
246|   when the browser window is closed
                    
247| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
248| 'sess_use_database'		= Whether to save the session data to a database
                    
                
constants.php http://nuke-viet.googlecode.com/svn/trunk/ | PHP | 239 lines
                    
1<?php
                    
2
                    
14//Ten file config
                    
15define( "NV_CONFIG_FILENAME", "config.php" );
                    
16
                    
87//Phuong phap ma hoa mat khau: 0 = md5, 1 = sha1
                    
88define( 'NV_CRYPT_SHA1', 1 );
                    
89
                    
185                    empty string)
                    
186E_STRICT			- run-time notices, enable to have PHP suggest changes
                    
187                    to your code which will ensure the best interoperability
                    
188                    and forward compatibility of your code
                    
189E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
                    
190E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
                    
227$global_config['check_op'] = "/^[a-zA-Z0-9\-]+$/";
                    
228$global_config['check_op_file'] = "/^([a-zA-Z0-9\-\_]+)\.php$/";
                    
229$global_config['check_block_global'] = "/^global\.([a-zA-Z0-9\-\_]+)\.php$/";
                    
                
crypto_tests.cpp https://bitbucket.org/lab408/ourchain-release.git | C++ | 237 lines
                    
136    result1 = crypt.Decrypt(vchCiphertext, vchDecrypted1);
                    
137    result2 = OldDecrypt(vchCiphertext, vchDecrypted2, crypt.vchKey.data(), crypt.vchIV.data());
                    
138    BOOST_CHECK(result1 == result2);
                    
148
                    
149    BOOST_CHECK_MESSAGE(vchDecrypted1 == vchDecrypted2, HexStr(vchDecrypted1.begin(), vchDecrypted1.end()) + " != " + HexStr(vchDecrypted2.begin(), vchDecrypted2.end()));
                    
150
                    
154
                    
155static void TestEncryptSingle(const CCrypter& crypt, const CKeyingMaterial& vchPlaintext,
                    
156                       const std::vector<unsigned char>& vchCiphertextCorrect = std::vector<unsigned char>())
                    
210        uint256 hash(GetRandHash());
                    
211        TestCrypter::TestEncrypt(crypt, std::vector<unsigned char>(hash.begin(), hash.end()));
                    
212    }
                    
225    TestCrypter::TestDecrypt(crypt,ParseHex("32d0a8974e3afd9c6c3ebf4d66aa4e6419f8c173de25947f98cf8b7ace49449c"));
                    
226    TestCrypter::TestDecrypt(crypt,ParseHex("e7c055cca2faa78cb9ac22c9357a90b4778ded9b2cc220a14cea49f931e596ea"));
                    
227    TestCrypter::TestDecrypt(crypt,ParseHex("b88efddd668a6801d19516d6830da4ae9811988ccbaf40df8fbb72f3f4d335fd"));
                    
                
DataObject.php https://gitlab.com/endomorphosis/falkenstein | PHP | 416 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHP OpenCloud library.
                    
4 *
                    
23 * objects to Cloud Files, the data is stored as-is (without compression or 
                    
24 * encryption) and consists of a location (container), the object's name, and 
                    
25 * any metadata you assign consisting of key/value pairs.
                    
                
rsa_compiled.js https://gitlab.com/gitoucouille/yodleur | JavaScript | 40 lines
                    
2 A Google-closure-compiler-advanced-optimized slightly-altered adaptation of Tom Wu's
                    
3 RSA encrypter, wrapped in an anonymous self-invoking function to make closure-compiler's
                    
4 211 "dangerous use of the global this object" warnings moot, and to introduce into global 
                    
4 211 "dangerous use of the global this object" warnings moot, and to introduce into global 
                    
5 scope only RSAKey.setPublic(n,e), which sets the RSAKey public key, and RSAKey.encrypt(str), 
                    
6 which produces the PKCS#1 encryption of an input string as an even-length hex string.
                    
13
                    
14 --which can be decrypted on a Java server, for example, by a javax.crypto.Cipher:
                    
15 Cipher de=Cipher.getInstance("RSA/ECB/PKCS1Padding");
                    
23*/
                    
24var j=null;window.RSAKey=RSAKey;window["RSAKey.encrypt"]=RSAKey.encrypt;window["RSAKey.setPublic"]=RSAKey.setPublic;var k;function l(a,c,b){a!=j&&("number"==typeof a?this.F(a,c,b):c==j&&"string"!=typeof a?n(this,a,256):n(this,a,c))}function p(){return new l(j)}function q(a,c,b,d,e,f){for(;--f>=0;){var g=c*this[a++]+b[d]+e,e=Math.floor(g/67108864);b[d++]=g&67108863}return e}function r(a,c,b,d,e,f){var g=c&32767;for(c>>=15;--f>=0;){var h=this[a]&32767,m=this[a++]>>15,i=c*h+m*g,h=g*h+((i&32767)<<15)+b[d]+(e&1073741823),e=(h>>>30)+(i>>>15)+c*m+(e>>>30);b[d++]=h&1073741823}return e}
                    
25function s(a,c,b,d,e,f){var g=c&16383;for(c>>=14;--f>=0;){var h=this[a]&16383,m=this[a++]>>14,i=c*h+m*g,h=g*h+((i&16383)<<14)+b[d]+e,e=(h>>28)+(i>>14)+c*m;b[d++]=h&268435455}return e}navigator.appName=="Microsoft Internet Explorer"?(l.prototype.i=r,k=30):navigator.appName!="Netscape"?(l.prototype.i=q,k=26):(l.prototype.i=s,k=28);l.prototype.c=k;l.prototype.g=(1<<k)-1;l.prototype.h=1<<k;l.prototype.u=Math.pow(2,52);l.prototype.l=52-k;l.prototype.m=2*k-52;var t=[],w,x;w="0".charCodeAt(0);
                    
39RSAKey.prototype.encrypt=function(a){var c;c=(this.f.a<=0?0:this.f.c*(this.f.a-1)+z(this.f[this.f.a-1]^this.f.b&this.f.g))+7>>3;if(c<a.length+11)alert("Message too long for RSA"),c=j;else{for(var b=[],d=a.length-1;d>=0&&c>0;){var e=a.charCodeAt(d--);e<128?b[--c]=e:e>127&&e<2048?(b[--c]=e&63|128,b[--c]=e>>6|192):(b[--c]=e&63|128,b[--c]=e>>6&63|128,b[--c]=e>>12|224)}b[--c]=0;for(a=[];c>2;){for(a[0]=0;a[0]==0;){d=a;e=void 0;for(e=0;e<d.length;++e){var f=d,g=e,h;if(O==j){P();h=O=new Q;for(var m=R,i=void 0,
                    
40o=void 0,v=void 0,i=0;i<256;++i)h.e[i]=i;for(i=o=0;i<256;++i)o=o+h.e[i]+m[i%m.length]&255,v=h.e[i],h.e[i]=h.e[o],h.e[o]=v;h.j=0;for(S=h.k=0;S<R.length;++S)R[S]=0;S=0}h=O.next();f[g]=h}}b[--c]=a[0]}b[--c]=2;b[--c]=0;c=new l(b)}if(c==j)return j;b=this.o;a=this.f;a=b<256||(a.a>0?a[0]&1:a.b)==0?new A(a):new I(a);c=c.exp(b,a);if(c==j)return j;c=c.toString(16);return(c.length&1)==0?c:"0"+c};var O,R,S;function P(){var a=(new Date).getTime();R[S++]^=a&255;R[S++]^=a>>8&255;R[S++]^=a>>16&255;R[S++]^=a>>24&255;S>=T&&(S-=T)}if(R==j){R=[];S=0;var U;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var V=window.crypto.random(32);for(U=0;U<V.length;++U)R[S++]=V.charCodeAt(U)&255}for(;S<T;)U=Math.floor(65536*Math.random()),R[S++]=U>>>8,R[S++]=U&255;S=0;P()};function Q(){this.k=this.j=0;this.e=[]}Q.prototype.next=function(){var a;this.j=this.j+1&255;this.k=this.k+this.e[this.j]&255;a=this.e[this.j];this.e[this.j]=this.e[this.k];this.e[this.k]=a;return this.e[a+this.e[this.j]&255]};var T=256;})();
                    
41
                    
                
SPDataAdditions.m https://gitlab.com/sheldonels/sequel-pro | Objective C | 289 lines
                    
70	// AES-128-cbc encrypt the data, filling in the buffer after the IV
                    
71	AES_cbc_encrypt(paddedBytes, encryptedBytes + 16, paddedLength, &aesKey, iv, AES_ENCRYPT);
                    
72	free(paddedBytes);
                    
96	unsigned char *decryptedBytes = (unsigned char*)malloc(encryptedLength);
                    
97	AES_cbc_encrypt([self bytes] + 16, decryptedBytes, encryptedLength, &aesKey, iv, AES_DECRYPT);
                    
98
                    
99	// If decryption was successful, these blocks will be zeroed
                    
100	if ( *((UInt32*)decryptedBytes + ((encryptedLength / 4) - 4)) ||
                    
101		 *((UInt32*)decryptedBytes + ((encryptedLength / 4) - 3)) ||
                    
101		 *((UInt32*)decryptedBytes + ((encryptedLength / 4) - 3)) ||
                    
102		 *((UInt32*)decryptedBytes + ((encryptedLength / 4) - 2)) )
                    
103	{
                    
107	// Get the size of the data from the last 32-bit chunk
                    
108	NSInteger bigIntDataLength = *((UInt32*)decryptedBytes + ((encryptedLength / 4) - 1));
                    
109	NSInteger dataLength = NSSwapBigIntToHost((unsigned int)bigIntDataLength);
                    
                
mysqli_driver.php https://gitlab.com/pollux1er/PerencoCanteenAdmin | PHP | 544 lines
                    
161
                    
162		if (is_array($this->encrypt))
                    
163		{
                    
164			$ssl = array();
                    
165			empty($this->encrypt['ssl_key'])    OR $ssl['key']    = $this->encrypt['ssl_key'];
                    
166			empty($this->encrypt['ssl_cert'])   OR $ssl['cert']   = $this->encrypt['ssl_cert'];
                    
166			empty($this->encrypt['ssl_cert'])   OR $ssl['cert']   = $this->encrypt['ssl_cert'];
                    
167			empty($this->encrypt['ssl_ca'])     OR $ssl['ca']     = $this->encrypt['ssl_ca'];
                    
168			empty($this->encrypt['ssl_capath']) OR $ssl['capath'] = $this->encrypt['ssl_capath'];
                    
168			empty($this->encrypt['ssl_capath']) OR $ssl['capath'] = $this->encrypt['ssl_capath'];
                    
169			empty($this->encrypt['ssl_cipher']) OR $ssl['cipher'] = $this->encrypt['ssl_cipher'];
                    
170
                    
183					// https://secure.php.net/ChangeLog-5.php#5.6.16
                    
184					// https://bugs.php.net/bug.php?id=68344
                    
185					elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
                    
                
mediauploader.php https://gitlab.com/jalon/doadoronline | PHP | 88 lines
                    
1<?php
                    
2/**
                    
55    {
                    
56        $host = parse_url($url, PHP_URL_HOST);
                    
57
                    
58        //filename to md5 digest
                    
59        $cryptoname    = md5($filepath) . "." . $mediafile['fileextension'];
                    
60        $boundary      = "zzXXzzYYzzXXzzQQ";
                    
72        $hBAOS .= "--" . $boundary . "\r\n";
                    
73        $hBAOS .= "Content-Disposition: form-data; name=\"file\"; filename=\"" . $cryptoname . "\"\r\n";
                    
74        $hBAOS .= "Content-Type: " . $mediafile['filemimetype'] . "\r\n\r\n";
                    
                
netload_in.php https://gitlab.com/billyprice1/rapidleech | PHP | 164 lines
                    
1<?php
                    
2if (!defined('RAPIDLEECH')) {
                    
29            if (!empty($_POST['cookie'])) {
                    
30                $this->cookie = decrypt(urldecode($_POST['cookie']));
                    
31                $this->page = $this->GetPage($this->link, $this->cookie, $post, $Referer);
                    
95        $dlink = trim($dl[0]);
                    
96        $filename = basename(parse_url($dlink, PHP_URL_PATH));
                    
97        $this->RedirectDownload($dlink, $filename, $this->cookie, 0, $Referer);
                    
112        $post['txtlogin'] = 'Login';
                    
113        $this->page = $this->GetPage($posturl . 'index.php', 0, $post, $posturl);
                    
114        is_present($this->page, '/index.php?id=15', 'Login failed, invalid username or password???');
                    
116        //check the premium account (IMPORTANT!)
                    
117        $this->page = $this->GetPage($posturl . 'index.php?id=2', $this->cookie);
                    
118        is_present($this->page, 'Order Premium Account now', 'Account Status : FREE!');
                    
130            
                    
131            $data = array_merge($this->DefaultParamArr('http://netload.in/' . $pw[1], encrypt($this->cookie)), array_combine($match[3], $match[2]));
                    
132            $data['step'] = 'password';
                    
                
mysql4-upgrade-0.1.1-0.1.2.php https://gitlab.com/blingbang2016/shop | PHP | 43 lines
                    
1<?php
                    
2/**
                    
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
                    
23 * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
30
                    
31// encrypt google base passwords
                    
32$select = $installer->getConnection()->select()
                    
36    $bind  = array(
                    
37        'value' => Mage::helper('core')->encrypt($row['value'])
                    
38    );
                    
                
config.php http://xtraupload.googlecode.com/svn/trunk/ | PHP | 311 lines
                    
20|
                    
21| Typically this will be your index.php file, unless you"ve renamed it to
                    
22| something else. If you are using mod_rewrite to remove the page set this
                    
143| invoke your controllers and its functions:
                    
144| example.com/index.php?c=controller&m=function
                    
145|
                    
166|	0 = Disables logging, Error logging TURNED OFF
                    
167|	1 = Error Messages (including PHP errors)
                    
168|	2 = Debug Messages
                    
215|
                    
216| If you use the Encryption class or the Sessions class with encryption
                    
217| enabled you MUST set an encryption key.  See the user guide for info.
                    
227| "session_cookie_name" = the name you want for the cookie
                    
228| "encrypt_sess_cookie" = TRUE/FALSE (boolean).  Whether to encrypt the cookie
                    
229| "session_expiration"  = the number of SECONDS you want the session to last.
                    
                
administrators.php https://github.com/validoc/Pikmas.git | PHP | 199 lines
                    
82<!-- header //-->
                    
83<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
                    
84<!-- header_eof //-->
                    
88  <tr>
                    
89    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
                    
90<!-- left_navigation //-->
                    
90<!-- left_navigation //-->
                    
91<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
                    
92<!-- left_navigation_eof //-->
                    
193<!-- footer //-->
                    
194<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
                    
195<!-- footer_eof //-->
                    
198</html>
                    
199<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
                    
200
                    
                
AuthController.php https://gitlab.com/tonycodes/prego | PHP | 62 lines
                    
1<?php
                    
2
                    
31            'username' => $request->input('username'),
                    
32            'password' => bcrypt($request->input('password'))
                    
33        ]);
                    
                
admin_finalconfirmation_m.php http://bitsand.googlecode.com/svn/trunk/ | PHP | 229 lines
                    
1<?php
                    
2/*
                    
23include ('../inc/inc_head_html.php');
                    
24include ('../inc/inc_commonqueries.php');
                    
25
                    
26$db_prefix = DB_PREFIX;
                    
27$key = CRYPT_KEY;
                    
28
                    
35<p>
                    
36<a href = 'admin_manageevent.php?EventID=<?php echo $eventinfo['evEventID'];?>'>Return to event management for - <?php echo $eventinfo['evEventName'];?></a>
                    
37</p>
                    
47<p>
                    
48Thank you for booking for the upcoming event, &lt;event name&gt;, you can download the event pack from <?php echo SYSTEM_URL ?>event.php
                    
49</p>
                    
79</p>
                    
80<form action='admin_finalconfirmation.php' method=post>
                    
81<table>
                    
                
ConfigurationTest.php https://gitlab.com/goolic/PrestaShop | PHP | 404 lines
                    
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
                    
30        '/cache/smarty/compile/index.php',
                    
31        '/classes/log/index.php',
                    
32        '/classes/cache/index.php',
                    
32        '/classes/cache/index.php',
                    
33        '/config/index.php',
                    
34        '/tools/tar/Archive_Tar.php',
                    
43        '/modules/index.php',
                    
44        '/override/controllers/front/index.php',
                    
45        '/pdf/order-return.tpl',
                    
369    {
                    
370        return function_exists('mcrypt_encrypt');
                    
371    }
                    
                
Common_model.php https://bitbucket.org/Yatindra_Mohite/lift.git | PHP | 400 lines
                    
174	
                    
175	public function id_encrypt($str = false) // Id Encryption
                    
176	{
                    
179	
                    
180	public function id_decrypt($str = false) // Id Decryption
                    
181	{
                    
184	
                    
185	public function id_encrypt_zub($str = false) // Id Encryption
                    
186	{
                    
190	
                    
191	public function id_decrypt_zub($str = false) // Id Decryption
                    
192	{
                    
315	    if( $action == 'encrypt' ) {
                    
316	        $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
                    
317	        $output = base64_encode($output);
                    
                
CaptchaHandler.php https://bitbucket.org/Pons-bdreamz/anubavam_task.git | PHP | 434 lines
                    
1<?php
                    
2if (is_callable('session_start')) { session_start(); }
                    
138  if (!array_key_exists('d', $_GET)) { // javascript player not used, we send the file directly as a download
                    
139    $downloadId = BDC_CryptoHelper::GenerateGuid();
                    
140    header("Content-Disposition: attachment; filename=captcha_{$downloadId}.wav");
                    
                
MemberTable.class.php http://piwam.googlecode.com/svn/trunk/ | PHP | 328 lines
                    
1<?php
                    
2/**
                    
187   * Try to select the (unique) user matching $username and
                    
188   * $password. $password is not crypted, he will be crypted
                    
189   * into the method. This method won't search disabled
                    
                
2c80_2cff.php https://gitlab.com/shubam39/CakeTooDoo | PHP | 89 lines
                    
1<?php
                    
2/**
                    
10 *
                    
11 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
12 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
18 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
19 * @link          http://cakephp.org CakePHP(tm) Project
                    
20 * @package       Cake.Config.unicode.casefolding
                    
20 * @package       Cake.Config.unicode.casefolding
                    
21 * @since         CakePHP(tm) v 1.2.0.5691
                    
22 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
66$config['2c80_2cff'][] = array('upper' => 11444, 'status' => 'C', 'lower' => array(11445)); /* COPTIC CAPITAL LETTER OLD COPTIC AIN */
                    
67$config['2c80_2cff'][] = array('upper' => 11446, 'status' => 'C', 'lower' => array(11447)); /* COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE */
                    
68$config['2c80_2cff'][] = array('upper' => 11448, 'status' => 'C', 'lower' => array(11449)); /* COPTIC CAPITAL LETTER DIALECT-P KAPA */
                    
69$config['2c80_2cff'][] = array('upper' => 11450, 'status' => 'C', 'lower' => array(11451)); /* COPTIC CAPITAL LETTER DIALECT-P NI */
                    
70$config['2c80_2cff'][] = array('upper' => 11452, 'status' => 'C', 'lower' => array(11453)); /* COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI */
                    
71$config['2c80_2cff'][] = array('upper' => 11454, 'status' => 'C', 'lower' => array(11455)); /* COPTIC CAPITAL LETTER OLD COPTIC OOU */
                    
                
CookieComponent.php https://gitlab.com/ViniciusP/project-games | PHP | 356 lines
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @since         1.2.0
                    
55     *   a secure connection exists.
                    
56     * - `key` - Encryption key used when encrypted cookies are enabled. Defaults to Security.salt.
                    
57     * - `httpOnly` - Set to true to make HTTP only cookies. Cookies that are HTTP only
                    
254        $this->_loaded[$first] = true;
                    
255        $this->_values[$first] = $this->_decrypt($cookie, $config['encryption']);
                    
256    }
                    
312            'name' => $name,
                    
313            'value' => $this->_encrypt($value, $config['encryption']),
                    
314            'expire' => $expires->format('U'),
                    
                
DownloadClass.php http://rapidleech36b.googlecode.com/svn/trunk/ | PHP | 273 lines
                    
1<?php
                    
2if (!defined('RAPIDLEECH')) {
                    
2if (!defined('RAPIDLEECH')) {
                    
3	require('../404.php');
                    
4	exit;
                    
94		}
                    
95		$loc = "{$_SERVER['PHP_SELF']}?filename=" . urlencode($FileName) .
                    
96				"&host=" . $Url ["host"] . "&port=" . (isset($Url ["port"]) ? $Url ["port"] : '') . "&path=" .
                    
103				(!empty($_GET ["uploadlater"]) && !empty($_GET['uploadtohost']) ? "&uploadlater=" . $_GET["uploadlater"] . "&uploadtohost=" . $_GET['uploadtohost'] : "") .
                    
104				"&cookie=" . ($cookie ? urlencode(encrypt($cookie)) : "") .
                    
105				"&post=" . ($post ? urlencode(serialize($post)) : "") .
                    
126
                    
127		if (!is_file("audl.php") || isset($options['forbid']['_audl'])) {
                    
128			html_error('audl.php not found or you have disable auto download feature!');
                    
135
                    
136		echo "<form action='audl.php?GO=GO' method='post' >\n";
                    
137		echo "<input type='hidden' name='links' value='" . $links . "'>\n";
                    
                
lib.php https://gitlab.com/mahara/mahara.git | PHP | 331 lines
                    
88        // for unicode character properties in php see:
                    
89        // http://php.net/manual/en/regexp.reference.unicode.php
                    
90        $containsUppercase = preg_match('/\p{Lu}/',       $password); // '/[A-Z]/'
                    
127        else {
                    
128            // $2a$ is bcrypt hash. See http://php.net/manual/en/function.crypt.php
                    
129            // It requires a cost, a 2 digit number in the range 04-31
                    
129            // It requires a cost, a 2 digit number in the range 04-31
                    
130            $user->password = $this->encrypt_password($password, $user->salt, '$2a$' . get_config('bcrypt_cost') . '$', get_config('passwordsaltmain'));
                    
131        }
                    
223    */
                    
224    public function encrypt_password($password, $salt='', $alg='$6$', $sitesalt='') {
                    
225        if ($salt == '') {
                    
279        if ($hash == $wehave) {
                    
280            if (!$bcrypt || substr($alg, 4, 2) != get_config('bcrypt_cost')) {
                    
281                // Either not using bcrypt yet, or the cost parameter has changed, update the hash
                    
                
config.php https://bitbucket.org/gh11e/assignment.git | PHP | 362 lines
                    
149| invoke your controllers and its functions:
                    
150| example.com/index.php?c=controller&m=function
                    
151|
                    
173|	0 = Disables logging, Error logging TURNED OFF
                    
174|	1 = Error Messages (including PHP errors)
                    
175|	2 = Debug Messages
                    
223| If you use the Encryption class or the Session class you
                    
224| MUST set an encryption key.  See the user guide for info.
                    
225|
                    
226*/
                    
227$config['encryption_key'] = '';
                    
228
                    
238|   when the browser window is closed
                    
239| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
                    
240| 'sess_use_database'		= Whether to save the session data to a database
                    
                
config.php http://three-cms.googlecode.com/svn/trunk/ | PHP | 332 lines
                    
23|
                    
24| Typically this will be your index.php file, unless you've renamed it to
                    
25| something else. If you are using mod_rewrite to remove the page set this
                    
146| invoke your controllers and its functions:
                    
147| example.com/index.php?c=controller&m=function
                    
148|
                    
218|
                    
219| If you use the Encryption class or the Sessions class with encryption
                    
220| enabled you MUST set an encryption key.  See the user guide for info.
                    
222*/
                    
223$config['encryption_key'] = "Default Three CMS Encryption Key";
                    
224
                    
230| 'session_cookie_name' = the name you want for the cookie
                    
231| 'encrypt_sess_cookie' = TRUE/FALSE (boolean).  Whether to encrypt the cookie
                    
232| 'session_expiration'  = the number of SECONDS you want the session to last.
                    
                
entropy.c https://gitlab.com/gregtyka/khanacademy | C | 173 lines
                    
13
                    
14typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTA)(HCRYPTPROV *phProv,\
                    
15              LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType,\
                    
28    CRYPTGENRANDOM pCryptGenRandom = NULL;
                    
29    CRYPTRELEASECONTEXT pCryptReleaseContext = NULL;
                    
30    HCRYPTPROV hCryptProv = 0;
                    
52	                  "CryptGenRandom");
                    
53	pCryptReleaseContext = (CRYPTRELEASECONTEXT) GetProcAddress(hAdvAPI32,\
                    
54	                       "CryptReleaseContext");
                    
67    /* Acquire context */
                    
68    if(!pCryptAcquireContextA(&hCryptProv, NULL, NULL, PROV_RSA_FULL,
                    
69                            CRYPT_VERIFYCONTEXT)) {
                    
89    /* Release context */
                    
90    if (!pCryptReleaseContext(hCryptProv, 0)) {
                    
91        PyErr_Format(PyExc_SystemError,
                    
                
email.php https://gitlab.com/Iftekhar_ramim/stock_management | PHP | 105 lines
                    
1<?php
                    
2require_once ('../../vendor/autoload.php');
                    
53 */
                    
54//SMTP needs accurate times, and the PHP time zone MUST be set
                    
55//This should be done in your php.ini, but this is how to do it if you don't have access to that
                    
56date_default_timezone_set('Etc/UTC');
                    
57require ('../../vendor/phpmailer/phpmailer/class.phpmailer.php');
                    
58//Create a new PHPMailer instance
                    
58//Create a new PHPMailer instance
                    
59$mail = new PHPMailer;
                    
60//Tell PHPMailer to use SMTP
                    
75$mail->Port = 587;
                    
76//Set the encryption system to use - ssl (deprecated) or tls
                    
77$mail->SMTPSecure = 'tls';
                    
97//Attach an image file
                    
98//$mail->addAttachment('images/phpmailer_mini.png');
                    
99//send the message, check for errors
                    
                
mr500.c https://gitlab.com/GrieverV/rockbox | C | 457 lines
                    
10 *      based on work by Shirour: 
                    
11 *          http://www.mrobe.org/forum/viewtopic.php?f=6&t=2176
                    
12 *   $Id$
                    
35 *
                    
36 *  The firmware for the M:Robe has basic encryption on it.  The data is XORed
                    
37 *  and scrambled. The mr500_save_data function provides an implemenation of the
                    
37 *  and scrambled. The mr500_save_data function provides an implemenation of the
                    
38 *  encryption/decryption.
                    
39 *
                    
41 *  in the system folder on the player.  The "{#4F494D4346575550#}" should only
                    
42 *  contain the encrypted N5002-BD.BIN file.  At the end of a firmware update
                    
43 *  the "{#4F494D4346575550#}" folder and it's contents are removed from the
                    
452    for(i=0; i<16; i++) {
                    
453        encrypt_array[decrypt_array[i]]=i;
                    
454    }
                    
                
Authentication.php https://gitlab.com/svillegas/magento2 | PHP | 168 lines
                    
1<?php
                    
2/**
                    
9use Magento\Backend\App\ConfigInterface;
                    
10use Magento\Framework\Encryption\EncryptorInterface as Encryptor;
                    
11use Magento\Framework\Exception\InvalidEmailOrPasswordException;
                    
43    /**
                    
44     * @var Encryptor
                    
45     */
                    
57     * @param \Magento\Framework\Stdlib\DateTime $dateTime
                    
58     * @param Encryptor $encryptor
                    
59     */
                    
64        \Magento\Framework\Stdlib\DateTime $dateTime,
                    
65        Encryptor $encryptor
                    
66    ) {
                    
70        $this->dateTime = $dateTime;
                    
71        $this->encryptor = $encryptor;
                    
72    }
                    
                
README.md https://gitlab.com/diegonobre/basic-symfony28-interview-test | Markdown | 127 lines
                    
1# Basic PHP and Symfony 2.8 interview
                    
2
                    
24- access to the internet
                    
25- an php capable IDE (we suggest PhpStorm with symfony, yaml, twig and php annotations plugin)
                    
26- working setup of PHP 5.6+ *(http://symfony.com/doc/current/reference/requirements.html)*
                    
34Access the project with your favourite browser. You should see similar welcome screen. **Dont forget to run composer install.**
                    
35![Symfony welcome screen](https://raw.githubusercontent.com/OskHa/php_interview_test/master/symfony_screenshot.png)
                    
36
                    
37*Help: PHP 5.6+ (debian/ubuntu)*
                    
38> sudo apt-get install -qq php5-cli php5-fpm php5-mysqlnd php5-curl php5-gd php5-json php5-redis php5-imap php5-intl php5-imagick php5-mcrypt php5-xdebug php5-xmlrpc php5-xsl php5-twig php5-mongo php5-dev
                    
39
                    
52
                    
531. Run the PhpUnit test. Check if there are any errors, if so fix them.
                    
54
                    
62  * copy the json string from mongodb website ([link](https://docs.mongodb.com/manual/reference/bios-example-collection/))
                    
63  * or download and load the archive dump ([link](https://raw.githubusercontent.com/OskHa/php_interview_test/master/symfony_mongodb_example.archive))
                    
64
                    
                
user_add.php http://viet-group.googlecode.com/svn/trunk/ | PHP | 275 lines
                    
1<?php
                    
2
                    
115        
                    
116        $password = $crypt->hash( $_user['password1'] );
                    
117        
                    
153            {
                    
154                @require_once ( NV_ROOTDIR . "/includes/class/upload.class.php" );
                    
155                
                    
195            
                    
196            Header( "Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name );
                    
197            exit();
                    
233$xtpl->assign( 'DATA', $_user );
                    
234$xtpl->assign( 'FORM_ACTION', NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=user_add" );
                    
235$xtpl->assign( 'NV_BASE_SITEURL', NV_BASE_SITEURL );
                    
270
                    
271include ( NV_ROOTDIR . "/includes/header.php" );
                    
272echo nv_admin_theme( $contents );
                    
                
CookieCryptTrait.php https://gitlab.com/ViniciusP/project-games | PHP | 172 lines
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @since         3.1.6
                    
46     * @param string $value Value to encrypt
                    
47     * @param string|bool $encrypt Encryption mode to use. False
                    
48     *   disabled encryption.
                    
128        if ($encrypt === 'rijndael') {
                    
129            $value = Security::rijndael($value, $this->_getCookieEncryptionKey(), 'decrypt');
                    
130        }
                    
131        if ($encrypt === 'aes') {
                    
132            $value = Security::decrypt($value, $this->_getCookieEncryptionKey());
                    
133        }
                    
                
rarentry.getstream.html git://pkgs.fedoraproject.org/php-manual-en | HTML | 113 lines
                    
11 <div class="up"><a href="class.rarentry.html">RarEntry</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="rarentry.getstream" class="refentry">
                    
37   <p class="para">The resulting stream has no integrity verification. In particular, file corruption and
                    
38   decryption with a wrong a key will not be detected. It is the programmer&#039;s responsability to use the entry&#039;s CRC
                    
39   to check for integrity, if he so wishes.</p>
                    
54      <p class="para">
                    
55       The password used to encrypt this entry. If the entry is not encrypted, this value will not be used and can
                    
56       be omitted. If this parameter is omitted and the entry is encrypted, the password given to
                    
59       output. If no password is given and one is required, this method will fail and return <b><tt>FALSE</tt></b>.
                    
60       You can check whether an entry is encrypted with  <span class="methodname"><a href="rarentry.isencrypted.html" class="function">RarEntry::isEncrypted</a></span>.
                    
61      </p>
                    
85    <div class="example-contents">
                    
86<div class="phpcode"><code><span style="color: #000000">
                    
87<span style="color: #0000BB">&lt;?php<br /><br />$rar_file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rar_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'example.rar'</span><span style="color: #007700">);<br />if&nbsp;(</span><span style="color: #0000BB">$rar_file&nbsp;</span><span style="color: #007700">===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</span><span style="color: #DD0000">"Failed&nbsp;to&nbsp;open&nbsp;Rar&nbsp;archive"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$entry&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rar_entry_get</span><span style="color: #007700">(</span><span style="color: #0000BB">$rar_file</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Dir/file.txt'</span><span style="color: #007700">);<br />if&nbsp;(</span><span style="color: #0000BB">$entry&nbsp;</span><span style="color: #007700">===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</span><span style="color: #DD0000">"Failed&nbsp;to&nbsp;find&nbsp;such&nbsp;entry"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$stream&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$entry</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getStream</span><span style="color: #007700">();<br />if&nbsp;(</span><span style="color: #0000BB">$stream&nbsp;</span><span style="color: #007700">===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</span><span style="color: #DD0000">"Failed&nbsp;to&nbsp;obtain&nbsp;stream."</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">rar_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$rar_file</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//stream&nbsp;is&nbsp;independent&nbsp;from&nbsp;file<br /><br /></span><span style="color: #007700">while&nbsp;(!</span><span style="color: #0000BB">feof</span><span style="color: #007700">(</span><span style="color: #0000BB">$stream</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$buff&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fread</span><span style="color: #007700">(</span><span style="color: #0000BB">$stream</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">8192</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$buff&nbsp;</span><span style="color: #007700">!==&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$buff</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;&nbsp;</span><span style="color: #FF8000">//fread&nbsp;error<br /></span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$stream</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
                    
                
11-Events.markdown https://github.com/sympal/sympal-docs.git | Markdown | 430 lines
                    
113
                    
114    [php]
                    
115    $user = new User();
                    
123
                    
124    [php]
                    
125    class sfSympalTestPluginConfiguration extends sfPluginConfiguration
                    
141        $json = json_encode($array);
                    
142        $encrypted = $this->someEncryptFunction($json);
                    
143
                    
152        // encrypt the json with some key/salt
                    
153        // so the retrieving end can decrypt it
                    
154
                    
357
                    
358    [php]
                    
359    class sfSympalTestPluginConfiguration extends sfPluginConfiguration
                    
                
index.php https://gitlab.com/mycryptochatex/mycryptochatex | PHP | 241 lines
                    
119<body>
                    
120    <?php         
                    
121    
                    
134            <div class="float-left">
                    
135                <p class="site-title"><a href="index.php">MyCryptoChatEx</a></p>
                    
136            </div>
                    
141                    <ul id="menu">
                    
142                        <li><a href="index.php">Home</a></li>
                    
143                        <li><a href="stats.php">Stats</a></li>
                    
188              <?php foreach ($allowedTimes as $minutes => $label) { ?>
                    
189                  <option value="<?php echo $minutes; ?>"><?php echo $label; ?></option>
                    
190              <?php } ?>
                    
222            <div class="float-left">
                    
223                <p>&copy; 2016 - MyCryptoChatEx <?php echo MYCRYPTOCHAT_VERSION; ?> by salikovi.cz</p>
                    
224            </div>
                    
                
Rsa.php https://github.com/tmccormi/openemr.git | PHP | 342 lines
                    
12use Traversable;
                    
13use Zend\Crypt\PublicKey\Rsa\Exception;
                    
14use Zend\Stdlib\ArrayUtils;
                    
41            throw new Exception\RuntimeException(
                    
42                'Can not create Zend\Crypt\PublicKey\Rsa; openssl extension to be loaded'
                    
43            );
                    
258        if (null === $key) {
                    
259            throw new Exception\InvalidArgumentException('No key specified for the decryption');
                    
260        }
                    
262        if (null === $padding) {
                    
263            $encrypted = $key->encrypt($data);
                    
264        } else {
                    
264        } else {
                    
265            $encrypted = $key->encrypt($data, $padding);
                    
266        }
                    
                
Queue.php https://gitlab.com/techniconline/kmc | PHP | 219 lines
                    
8use Illuminate\Contracts\Queue\QueueableEntity;
                    
9use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract;
                    
10
                    
151    {
                    
152        $closure = $this->crypt->encrypt((new Serializer)->serialize($job));
                    
153
                    
210     *
                    
211     * @param  \Illuminate\Contracts\Encryption\Encrypter $crypt
                    
212     * @return void
                    
213     */
                    
214    public function setEncrypter(EncrypterContract $crypt)
                    
215    {
                    
215    {
                    
216        $this->crypt = $crypt;
                    
217    }
                    
                
plugin_ajax.php https://gitlab.com/luyxtran264/myproject | PHP | 196 lines
                    
1<?php
                    
2
                    
63					$c_val_s = intval(wp_kses($_REQUEST['cValS'], ''));
                    
64					$c_val_1_str = transfers_decrypt(wp_kses($_REQUEST['cVal1'], ''), $enc_key);
                    
65					$c_val_2_str = transfers_decrypt(wp_kses($_REQUEST['cVal2'], ''), $enc_key);
                    
                
 

Source

Language