100+ results results for 'php sha1' (654 ms)
1<?php 2 65 $cid_parts = array(url($path, array('absolute' => TRUE)), 'html'); 66 $cid = sha1(implode(':', $cid_parts)); 67 $cache_entry = \Drupal::cache('page')->get($cid); 205 * 206 * The test should pass even if zlib.output_compression is enabled in php.ini, 207 * .htaccess or similar, or if compression is done outside PHP, e.g. by thesmarty_cacheresource_custom.php git://github.com/modxcms/revolution.git | PHP | 297 lines
1<?php 2/** 87 $path = $cached->source->uid . $_cache_id . $_compile_id; 88 $cached->filepath = sha1($path); 89 if ($_template->smarty->cache_locking) { 89 if ($_template->smarty->cache_locking) { 90 $cached->lock_id = sha1('lock.' . $path); 91 }users.php git://github.com/q2a/question2answer.git | PHP | 417 lines
1<?php 2/* 18 19 More about this license: http://www.question2answer.org/license.php 20*/ 37 38 return sha1(substr($salt, 0, 8) . $password . substr($salt, 8)); 39} 52{ 53 require_once QA_INCLUDE_DIR . 'util/string.php'; 54 206 207 require_once QA_INCLUDE_DIR . 'util/string.php'; 208 247 248 require_once QA_INCLUDE_DIR . 'util/string.php'; 249Pop3Socket.php git://github.com/infinitas/infinitas.git | PHP | 273 lines
1<?php 2App::uses('EmailSocket', 'Emails.Network'); 4/** 5 * A pop3 driver for the email socket to recive emails without the php-imap extention 6 * 146 ); 147 $listItem['id'] = sha1(serialize($listItem)); 148 $this->mailList[$parts[0]] = $listItem;DKIMSignerTest.php git://github.com/swiftmailer/swiftmailer.git | PHP | 220 lines
1<?php 2 24 25 // SHA1 Signing 26 public function testSigningSHA1() 30 $signer = new Swift_Signers_DKIMSigner(file_get_contents(dirname(dirname(dirname(__DIR__))).'/_samples/dkim/dkim.test.priv'), 'dummy.nxdomain.be', 'dummySelector'); 31 $signer->setHashAlgorithm('rsa-sha1'); 32 $signer->setSignatureTimestamp('1299879181'); 44 $sig = reset($dkim); 45 $this->assertEquals($sig->getValue(), 'v=1; a=rsa-sha1; bh=wlbYcY9O9OPInGJ4D0E/rGsvMLE=; d=dummy.nxdomain.be; h=; i=@dummy.nxdomain.be; s=dummySelector; t=1299879181; b=RMSNelzM2O5MAAnMjT3G3/VF36S3DGJXoPCXR001F1WDReu0prGphWjuzK/m6V1pwqQL8cCNg Hi74mTx2bvyAvmkjvQtJf1VMUOCc9WHGcm1Yec66I3ZWoNMGSWZ1EKAm2CtTzyG0IFw4ml9DI wSkyAFxlgicckDD6FibhqwX4w='); 46 } 67 $sig = reset($dkim); 68 $this->assertEquals($sig->getValue(), 'v=1; a=rsa-sha256; bh=f+W+hu8dIhf2VAni89o8lF6WKTXi7nViA4RrMdpD5/U=; d=dummy.nxdomain.be; h=; i=@dummy.nxdomain.be; s=dummySelector; t=1299879181; b=jqPmieHzF5vR9F4mXCAkowuphpO4iJ8IAVuioh1BFZ3VITXZj5jlOFxULJMBiiApm2keJirnh u4mzogj444QkpT3lJg8/TBGAYQPdcvkG3KC0jdyN6QpSgpITBJG2BwWa+keXsv2bkQgLRAzNx qRhP45vpHCKun0Tg9LrwW/KCg='); 69 }Pbkdf2.php git://github.com/rchouinard/phpass.git | PHP | 290 lines
2/** 3 * PHP Password Library 4 * 11 12namespace Phpass\Hash\Adapter; 13 28 29 const DIGEST_SHA1 = 'sha1'; 30 const DIGEST_SHA256 = 'sha256'; 72 if ($matches['digest'] == '') { 73 $matches['digest'] = $matches[1] = self::DIGEST_SHA1; 74 } 271 */ 272 protected function _pbkdf2($password, $salt, $iterationCount = 1000, $keyLength = 20, $algo = 'sha1') 273 {packet-asf.c git://pkgs.fedoraproject.org/wireshark | C | 390 lines
40 * See 41 * http://www.dmtf.org/standards/standard_alert.php 42 * http://www.dmtf.org/standards/documents/ASF/DSP0136.pdf 130static const value_string asf_authentication_type_vals[] = { 131 { 0x01, "RAKP-HMAC-SHA1" }, 132 { 0x00, NULL } 135static const value_string asf_integrity_type_vals[] = { 136 { 0x01, "HMAC-SHA1-96" }, 137 { 0x00, NULL }qq_OAuth.php http://ownerpress.googlecode.com/svn/trunk/ | PHP | 328 lines
1<?php 2/** 191 function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { 192 $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); 193 $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); 301 $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters); 302 $request->sign_request($this->sha1_method, $this->consumer, $this->token); 303 switch ($method) {slideshare_external_repository_manager_connector.class.php https://bitbucket.org/chamilo/chamilo-ext-repo-slideshare-dev/ | PHP | 304 lines
1<?php 2namespace common\extensions\external_repository_manager\implementation\slideshare; 21 22require_once dirname(__FILE__) . '/slideshare_external_repository_object.class.php'; 23require_once dirname(__FILE__) . '/webservices/slideshare_rest_client.class.php'; 62 $date = time(); 63 $hash = sha1($this->consumer_secret . $date); 64 $params = array(); 112 $date = time(); 113 $hash = sha1($this->consumer_secret . $date); 114 $params = array(); 182 183 /* (non-PHPdoc) 184 * @see application/common/external_repository_manager/ExternalRepositoryManagerConnector#retrieve_external_repository_object() 188 $date = time(); 189 $hash = sha1($this->consumer_secret . $date); 190 $params = array();r2t.php git://github.com/chregu/rss2twi.php.git | PHP | 273 lines
1<?php 2 14 protected function init() { 15 include_once ("sfYaml/sfYaml.class.php"); 16 define('R2T_TEMP_DIR', R2T_PROJECT_DIR . "/tmp/"); 75 $this->debug("create " . $options['shortener'] . " class"); 76 include_once ("r2t/shortener/" . $options['shortener'] . ".php"); 77 $classname = "r2t_shortener_" . $options['shortener']; 92 // check if something was posted with that link already 93 include_once("HTTP/Request.php"); 94 if (isset($options['twitter']['user'])) { 132 133 $oauth = new OAuth($conskey,$conssec,OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_URI); 134 $oauth->debug = 1; 150 if (!empty($options['prowlApiKey'])) { 151 include_once('ProwlPHP/ProwlPHP.php'); 152 $prowl = new Prowl($options['prowlApiKey']);gmailoath.php https://gitlab.com/engrmuhammadawais/test.git | PHP | 410 lines
1<?php 2 18 19 ////////////////// global.php open////////////// 20 function logit($msg, $preamble=true) { 320 $signature_key = $this->rfc3986_encode($consumer_secret) . '&' . $this->rfc3986_encode($token_secret); 321 $sig = base64_encode(hash_hmac('sha1', $base_string, $signature_key, true)); 322 if ($this->debug) { 362 // Decompose and pull query params out of the url 363 $query_str = parse_url($url, PHP_URL_QUERY); 364 if ($query_str) {ReplicationStrategyTest.php https://bitbucket.org/colossal/legacy-heart-care.git | PHP | 382 lines
1<?php 2 175 $cmdEval = $profile->createCommand('EVAL', array($writeScript)); 176 $cmdEvalSHA = $profile->createCommand('EVALSHA', array(sha1($writeScript))); 177 $this->assertFalse($strategy->isReadOperation($cmdEval)); 180 $cmdEval = $profile->createCommand('EVAL', array($readScript)); 181 $cmdEvalSHA = $profile->createCommand('EVALSHA', array(sha1($readScript))); 182 $this->assertTrue($strategy->isReadOperation($cmdEval));helper.php https://bitbucket.org/joomla/joomla-platform/ | PHP | 530 lines
1<?php 2/** 306 case 'sha' : 307 $encrypted = base64_encode(mhash(MHASH_SHA1, $plaintext)); 308 return ($show_encrypt) ? '{SHA}'.$encrypted : $encrypted; 320 case 'ssha' : 321 $encrypted = base64_encode(mhash(MHASH_SHA1, $plaintext.$salt).$salt); 322 return ($show_encrypt) ? '{SSHA}'.$encrypted : $encrypted; 422 } else { 423 return mhash_keygen_s2k(MHASH_SHA1, $plaintext, substr(pack('h*', md5(mt_rand())), 0, 8), 4); 424 } 476 $stat = @stat(__FILE__); 477 if (empty($stat) || !is_array($stat)) $stat = array(php_uname()); 478Model.php git://github.com/forkcms/forkcms.git | PHP | 471 lines
1<?php 2 129 /** 130 * Encrypt the password with PHP password_hash function. 131 * 141 /** 142 * Verify the password with PHP password_verify function. 143 * 163 { 164 return md5(sha1(md5($string)) . sha1(md5($salt))); 165 }Auth_OpenID_DumbStore.html https://github.com/AlexChien/EY_BBS.git | HTML | 318 lines
22 <div class="info-box-body"> 23 <!-- ========== Info from phpDoc block ========= --> 24<p class="short-description">This is a store for use in the worst case, when you have no way of saving state on the consumer site. Using this store makes the consumer vulnerable to replay attacks, as it's unable to use nonces. Avoid using this store if it is at all possible.</p> 29 <p class="notes"> 30 Located in <a class="field" href="_Auth---OpenID---DumbStore.php.html">/Auth/OpenID/DumbStore.php</a> (line <span class="field">34</span>) 31 </p> 110 111 <!-- ========== Info from phpDoc block ========= --> 112<p class="short-description">Creates a new <a href="../OpenID/Auth_OpenID_DumbStore.html">Auth_OpenID_DumbStore</a> instance. For the security of the tokens generated by the library, this class attempts to at least have a secure implementation of getAuthKey.</p> 112<p class="short-description">Creates a new <a href="../OpenID/Auth_OpenID_DumbStore.html">Auth_OpenID_DumbStore</a> instance. For the security of the tokens generated by the library, this class attempts to at least have a secure implementation of getAuthKey.</p> 113<p class="description"><p>When you create an instance of this class, pass in a secret phrase. The phrase is hashed with sha1 to make it the correct length and form for an auth key. That allows you to use a long string as the secret phrase, which means you can make it very difficult to guess.</p><p>Each <a href="../OpenID/Auth_OpenID_DumbStore.html">Auth_OpenID_DumbStore</a> instance that is created for use by your consumer site needs to use the same $secret_phrase.</p></p> 114 314 <p class="notes" id="credit"> 315 Documentation generated on Wed, 05 Dec 2007 14:02:12 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a> 316 </p>g2apay.php https://bitbucket.org/mmahdy/opencart-modules-app.git | PHP | 302 lines
1<?php 2 146 } else { 147 $data['payment_g2apay_secret_token'] = sha1(uniqid(mt_rand(), 1)); 148 } 149 150 $data['g2apay_ipn_url'] = HTTPS_CATALOG . 'index.php?route=extension/payment/g2apay/ipn&token=' . $data['payment_g2apay_secret_token']; 151index.php git://github.com/chromium/chromium.git | PHP | 288 lines
1<?php 2/** 26require_once 'lib/oauth/OAuth.php'; 27require_once 'lib/lightopenid/openid.php'; 28 31 'https'; 32$selfUrl = "$scheme://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}"; 33 53 $this->token = new OAuthToken(self::TOKEN, self::TOKEN_SECRET); 54 $this->signatureMethod = new OAuthSignatureMethod_HMAC_SHA1(); 55 } 181 <?php else: ?> 182 <span>Welcome <?php echo @$_SESSION['attributes']['namePerson/first'] ?> <?php echo @$_SESSION['attributes']['namePerson/last'] ?> ( <?php echo $_SESSION['attributes']['contact/email'] ?> )</span> 183 <a href="?logout">Sign out</a> 183 <a href="?logout">Sign out</a> 184 <?php endif; ?> 185 </nav>WebhookTesting.php https://bitbucket.org/awylie199/s5t.git | PHP | 391 lines
1<?php 2namespace Braintree; 8 $payload = base64_encode(self::_sampleXml($kind, $id)) . "\n"; 9 $signature = Configuration::publicKey() . "|" . Digest::hexDigestSha1(Configuration::privateKey(), $payload); 10ext_openssl.h git://github.com/facebook/hiphop-php.git | C Header | 228 lines
10 | available through the world-wide-web at the following url: | 11 | http://www.php.net/license/3_01.txt | 12 | If you did not receive a copy of the PHP license and are unable to | 13 | obtain it through the world-wide-web, please send a note to | 14 | license@php.net so we can mail you a copy immediately. | 15 +----------------------------------------------------------------------+ 41 42#define OPENSSL_ALGO_SHA1 1 43#define OPENSSL_ALGO_MD5 2 70 71enum php_openssl_cipher_type { 72 PHP_OPENSSL_CIPHER_RC2_40, 76 PHP_OPENSSL_CIPHER_3DES, 77 PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40 78};SproutForms_EntriesService.php https://bitbucket.org/graphicactivity/rollingstills.git | PHP | 624 lines
1<?php 2namespace Craft; 53 // Setting the title explicitly to perform field validation 54 $entry->getContent()->setAttribute('title', sha1(time())); 55-empleado.amigable.agregar.php https://github.com/vlad88sv/BCA.git | PHP | 155 lines
1<?php 2 54 { 55 $datos['fotografia'] = sha1(microtime()); 56 Imagen__Convertir_JPEG($_FILES['fotografia']['tmp_name'],'IMG/fotografias/'.$datos['fotografia'].'.jpg'); 99?> 100<h1>Agregar empleado a <?php echo usuario_cache('razon_social'); ?></h1> 101<p>En esta seccion puede agregar nuevos empleados de su empresa al sistema de <?php echo PROY_NOMBRE ?>.</p> 102<p>Por favor llene los nombres y apellidos segun aparece en el DUI de su empleado sin utilizar abreviaturas, sobrenombres o diminutivos.</p> 103<p class="importante">Ud. no podra editar esta informacion una vez ingresada y aceptada en el sistema, si deseara realizar un cambio a esta informacion en el futuro podrá realizarla sin ningún costo a travez de su ejecutivo de cuenta de <?php echo PROY_NOMBRE; ?>.</p> 104<form autocomplete="off" enctype="multipart/form-data" action ="<?php echo PROY_URL_ACTUAL_DINAMICA; ?>" method="post"> 106<table class="t100 tfija"> 107<tr><th><acronym title="Documento Único de Identidad">DUI</acronym></th><td><input id="DUI" name="DUI" type="text" value="<?php echo @$_POST['DUI']; ?>" /></td></tr> 108<tr><th><acronym title="Número de Identificación Triburataria">NIT</acronym></th><td><input id="NIT" name="NIT" type="text" value="<?php echo @$_POST['NIT']; ?>" /></td></tr> 108<tr><th><acronym title="Número de Identificación Triburataria">NIT</acronym></th><td><input id="NIT" name="NIT" type="text" value="<?php echo @$_POST['NIT']; ?>" /></td></tr> 109<tr><th>Nombres</th><td><input name="nombres" type="text" value="<?php echo @$_POST['nombres']; ?>" /></td></tr> 110<tr><th>Apellidos</th><td><input name="apellidos" type="text" value="<?php echo @$_POST['apellidos']; ?>" /></td></tr>files.php git://github.com/MilkZoft/ZanPHP.git | PHP | 390 lines
1<?php 2if (!defined("ACCESS")) { 33 $parts = explode(".", $names[$i]); 34 $filename = substr(sha1($parts[0]), 0, 15); 35 $extension = end($parts); 86 break; 87 case 'text/php': 88 $extension = "php"; 121 if (file_exists("www/lib/files/$dir/$filename.$extension")) { 122 $filename = substr(sha1(code(10)), 0, 15); 123 } 171 $audio = array("wav", "midi", "mid", "mp3", "wma"); 172 $codes = array("asp", "php", "c", "as", "html", "js", "css", "rb"); 173 $document = array("csv", "doc", "docx", "pdf", "ppt", "pptx", "txt", "xls", "xlsx");authentication.php git://github.com/forkcms/forkcms.git | PHP | 355 lines
1<?php 2 75 /** 76 * Returns a string encrypted like sha1(md5($salt) . md5($string)) 77 * The salt is an optional extra string you can strenghten your encryption with 88 // return the encrypted string 89 return (string) sha1(md5($salt) . md5($string)); 90 }config-defaults.php https://github.com/ghoppe/Garden.git | PHP | 132 lines
1<?php if (!defined('APPLICATION')) exit(); 2// DO NOT EDIT THIS FILE. 2// DO NOT EDIT THIS FILE. 3// If you want to override the settings in this file then edit config.php. 4// This is the global application configuration file that sets up default 16 PDO::ATTR_PERSISTENT => FALSE, 17 1000 => TRUE, // PDO::MYSQL_ATTR_USE_BUFFERED_QUERY is missing in some php installations 18 1002 => "set names 'utf8'" // PDO::MYSQL_ATTR_INIT_COMMAND is missing in PHP 5.3, so I use the actual value "1002" instead 44$Configuration['Garden']['Cookie']['Domain'] = ''; 45$Configuration['Garden']['Cookie']['HashMethod'] = 'md5'; // md5 or sha1 46$Configuration['Garden']['Authenticator']['DefaultScheme'] = 'password'; // Types include 'Password', 'Handshake', 'Openid' 54$Configuration['Garden']['Errors']['LogFile'] = ''; 55$Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php'; // Used at installation time and you should use it too view when debugging 56$Configuration['Garden']['SignIn']['Popup'] = TRUE; // Should the sign-in link pop up or go to it's own page? (SSO requires going to it's own external page)vpn_ssl_config.php http://windowsfw.googlecode.com/svn/trunk/ | PHP | 321 lines
47?> 48<body class=bianju onload="changeShowVersion('priv'),changeShowNoObj('<?php echo $sl ?>')"> 49 <table width=460 border=0 cellpadding=0 cellspacing=0 > 109 <td>Trap?????? 110 <input name="server" type="text" id="server" value=<?php echo $list['TrapAddr'] ?>> </td> 111 </tr> 113 <td>?? ? 114 <input name="username" type="text" id="username" value=<?php echo $list['User']?>> </td> 115 </tr> 178 <option value="MD5" <?php echo $m ?>>MD5</option> 179 <option value="SHA1" <?php echo $s ?>>SHA1</option> 180 </SELECT> 200 <td>???? ? 201 <input name="secpass" type="password" id="secpass" value="<?php echo $list["CryPass"]?>" > </td> 202 </tr>enroll.inc.php https://github.com/atutor/ATutor.git | PHP | 260 lines
1<?php 2/************************************************************************/ 116 117 require_once(AT_INCLUDE_PATH.'classes/phpmailer/atutormailer.class.php'); 118 147 ('$student[uname]', 148 '". sha1($student[uname]). "', 149 '$student[email]', 178 // send email here. 179 $confirmation_link = AT_BASE_HREF . 'confirm.php?id='.$m_id.SEP.'m='.$code; 180WebSocketHandshake.java git://github.com/eclipse/paho.mqtt.java.git | Java | 230 lines
10 * and the Eclipse Distribution License is available at 11 * https://www.eclipse.org/org/documents/edl-v10.php 12 * 39 private static final String ACCEPT_SALT = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; 40 private static final String SHA1_PROTOCOL = "SHA1"; 41 private static final String HTTP_HEADER_SEC_WEBSOCKET_ACCEPT = "sec-websocket-accept"; 210 // then we check that the response is the same. 211 byte[] sha1Bytes = sha1(key + ACCEPT_SALT); 212 String encodedSha1Bytes = Base64.encodeBytes(sha1Bytes).trim(); 212 String encodedSha1Bytes = Base64.encodeBytes(sha1Bytes).trim(); 213 if (!encodedSha1Bytes.equals(accept.trim())) { 214 throw new HandshakeFailedException(); 218 /** 219 * Returns the sha1 byte array of the provided string. 220 *tpm_unseal.c https://bitbucket.org/killerpenguinassassins/open_distrib_devel.git | C | 499 lines
18 * along with this program; if not, a copy can be viewed at 19 * http://www.opensource.org/licenses/cpl1.0.php. 20 */ 83 BYTE *symKey; 84 BYTE wellKnown[TCPA_SHA1_160_HASH_LEN] = TSS_WELL_KNOWN_SECRET; 85 char *srkSecret = NULL; 343 if (srkWellKnown) 344 rc = Tspi_Policy_SetSecret(hPolicy, TSS_SECRET_MODE_SHA1, 345 sizeof(wellKnown),HubSub.php https://gitlab.com/otharwa/gnu-social.git | PHP | 273 lines
1<?php 2/* 32 33 public $hashkey; // sha1(topic . '|' . $callback); (topic, callback) key is too long for myisam in utf8 34 public $topic; 44 { 45 return sha1($topic . '|' . $callback); 46 } 253 if ($this->secret) { 254 $hmac = hash_hmac('sha1', $atom, $this->secret); 255 $headers[] = "X-Hub-Signature: sha1=$hmac";redux_auth_model.php https://github.com/nmani/OpenBama.git | PHP | 535 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/* 83 84 $password = $salt . substr(sha1($salt . $password), 0, -$salt_length); 85 117 118 $password = $salt . substr(sha1($salt . $password), 0, -$salt_length); 119 188 189 $activation_code = sha1(md5(microtime())); 190 $this->activation_code = $activation_code; 533 534/* End of file redux_auth_model.php */ 535/* Location: ./system/application/models/redux_auth_model.php */String.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 374 lines
1<?php 2/** 2/** 3 * Lithium: the most rad php framework 4 * 6 * Copyright 2009, Cake Software Foundation, Inc. (http://cakefoundation.org) 7 * @license http://opensource.org/licenses/mit-license.php The MIT License 8 */ 62 * @param string $string String to hash. 63 * @param string $type Method to use (sha1/sha256/md5, or any method supported 64 * by the `hash()` function). 67 */ 68 public static function hash($string, $type = 'sha1', $salt = null) { 69 $string = $salt . $string; 71 switch (true) { 72 case ($type == 'sha1' && function_exists('sha1')): 73 return sha1($string);rtkUser.php https://github.com/kc5nra/RevTK.git | PHP | 267 lines
1<?php 2 206 * 207 * We use sha1() like PunBB to store passwords. 208 * 211 * salt VARCHAR(32) => md5(rand(100000, 999999).$this->getNickname().$this->getEmail()); 212 * password VARCHAR(40) => sha1($salt.$raw_password) 213 * 217 { 218 return sha1($raw_password); 219 }edit_globals.php https://bitbucket.org/astawiarski/openemr.git | PHP | 439 lines
1<?php 2// Copyright (C) 2010 Rod Roark <rod@sunsetsystems.com> 8 9require_once("../globals.php"); 10require_once("$srcdir/acl.inc"); 10require_once("$srcdir/acl.inc"); 11require_once("$srcdir/formdata.inc.php"); 12require_once("$srcdir/globals.inc.php"); 13require_once("$srcdir/user.inc"); 14require_once("$srcdir/classes/CouchDB.class.php"); 15 54<head> 55<?php 56 86 echo "}"; 87 echo "self.location.href='edit_globals.php?mode=user&unique=yes';"; 88 echo "</script>";Store.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 406 lines
1<?php 2 151 if (!$response->headers->has('X-Content-Digest')) { 152 $digest = 'en'.sha1($response->getContent()); 153 358 359 return $this->keyCache[$request] = 'md'.sha1($request->getUri()); 360 }SrpConstants.cs https://openHistorian.svn.codeplex.com/svn | C# | 270 lines
10// 11// http://www.opensource.org/licenses/eclipse-1.0.php 12// 37 /// This implementation of SRP uses SHA-512 as the performance difference between 38 /// SHA1 and SHA-512 is negligable. 39 /// </remarks>ImageMagic.php https://bitbucket.org/kiruthiga208/expertplus_enc.git | PHP | 334 lines
1<?php 2/** 32 if (!(extension_loaded('imagick'))) { 33 throw new \RuntimeException('You need to install Imagick PHP Extension OR use http://github.com/Gregwar/Image library'); 34 } 110 111 $this->hash = sha1(serialize($datas)); 112 }HashModule.java https://github.com/moriyoshi/quercus-gae.git | Java | 537 lines
50 * This module uses the {@link MessageDigest} class to calculate 51 * digests. Typical java installations support MD2, MD5, SHA1, SHA256, SHA384, 52 * and SHA512. 233 234 // php/530c 235 if (keyString != null) 530 _algorithmMap.put("md5", "MD5"); 531 _algorithmMap.put("sha1", "SHA"); 532 _algorithmMap.put("sha256", "SHA-256");login.php https://bitbucket.org/jon0/jobislanddev | PHP | 363 lines
32else 33 ("Location: index.php"); 34 86 // if everything is ok then we allow to reset password via redirect to new page! 87 header("Location: login.php?action=resetpass&reset=$account&cond=1"); 88 } 176 if ($info['type'] == 1) 177 header("Location: ./employers/index.php"); 178 } 195{ 196 document.location.href= "login.php" 197} 320<!-- 2 ways to pass form, using PHP_SELF or just putting in the location and file name. Both works fine. --> 321<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> 322<table border="0" align="center">openssl.stub.php https://github.com/php/php-src.git | PHP | 266 lines
1<?php 2 33 34function openssl_x509_fingerprint(OpenSSLCertificate|string $certificate, string $digest_algo = "sha1", bool $binary = false): string|false {} 35 129 130function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = "sha1"): string|false {} 131 195 */ 196function openssl_sign(string $data, &$signature, $private_key, string|int $algorithm = OPENSSL_ALGO_SHA1): bool {} 197 198/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key */ 199function openssl_verify(string $data, string $signature, $public_key, string|int $algorithm = OPENSSL_ALGO_SHA1): int|false {} 200compat.php https://bitbucket.org/sebastianpisula/wordpress-starter.git | PHP | 372 lines
2/** 3 * WordPress implementation for PHP functions either missing from older PHP versions or not included by default. 4 * 35 if ( 'reset' === $utf8_pcre ) { 36 // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- intentional error generated to detect PCRE/u support. 37 $utf8_pcre = @preg_match( '/^./u', 'a' ); 221 * 222 * The Hash extension is bundled with PHP by default since PHP 5.1.2. 223 * However, the extension may be explicitly disabled on select servers. 223 * However, the extension may be explicitly disabled on select servers. 224 * As of PHP 7.4.0, the Hash extension is a core PHP extension and can no 225 * longer be disabled. 299 * However, the Hash extension may be explicitly disabled on select servers. 300 * As of PHP 7.4.0, the Hash extension is a core PHP extension and can no 301 * longer be disabled.UIDGenerator.php https://gitlab.com/mcepl/dumpathome.git | PHP | 350 lines
1<?php 2/** 69 } 70 $this->nodeId32 = wfBaseConvert( substr( sha1( $nodeId ), 0, 8 ), 16, 2, 32 ); 71 $this->nodeId48 = wfBaseConvert( $nodeId, 16, 2, 48 ); 267 // The drift is immediate for processes running while the system clock changes. 268 // time() does not have this problem. See https://bugs.php.net/bug.php?id=42659. 269 if ( abs( time() - $time[0] ) >= 2 ) { 303 $ct = self::millitime(); 304 if ( $ct >= $time ) { // http://php.net/manual/en/language.operators.comparison.php 305 return $ct; // current timestamp is higher than $time 317 list( $sec, $msec ) = $time; 318 if ( PHP_INT_SIZE >= 8 ) { // 64 bit integers 319 $ts = ( 1000 * $sec + $msec );registrationPresenter.php https://github.com/Buri/Aragorn.cz.git | PHP | 247 lines
1<?php 2 103 $data["create_time"] = time(); 104 $data["password"] = sha1($data["password"]); 105 unset($data['eula']); 236 $row->update(array( 237 "password" => sha1($password) 238 ));Store.php https://bitbucket.org/BG-Media/shopita-web.git | PHP | 707 lines
1<?php 2 196 { 197 return sha1(uniqid('', true).Str::random(25).microtime(true)); 198 }ConsumerTest.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
1<?php 2/** 22 23require_once 'Zend/Oauth/Consumer.php'; 24 32 */ 33class Zend_Oauth_ConsumerTest extends PHPUnit_Framework_TestCase 34{ 57 $options = array( 58 'signatureMethod' => 'rsa-sha1' 59 ); 60 $consumer = new Zend_Oauth_Consumer($options); 61 $this->assertEquals('RSA-SHA1', $consumer->getSignatureMethod()); 62 }login.php https://bitbucket.org/jon0/jobislanddev | PHP | 341 lines
32else 33 ("Location: index.php"); 34 40 if (md5($number) != $_SESSION['image_random_value']) 41 die ('Validation string not valid! Please try again! Click <a href=login.php>here</a> to go back.'); 42 else 182{ 183 document.location.href= "login.php" 184} 285<!-- 2 ways to pass form, using PHP_SELF or just putting in the location and file name. Both works fine. --> 286<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> 287<table border="0" align="center"> 316<p style="font-weight: bold; font-size: 14;" align="center">Came here by mistake? Click <b><a href="./../login.php">here to go back to the home page!</a></b> 317<?php 318}SectionMaint.php https://code.google.com/p/yapeal/ | PHP | 152 lines
1<?php 2/** 4 * 5 * PHP version 5 6 * 6 * 7 * LICENSE: This file is part of Yet Another Php Eve Api library also know 8 * as Yapeal which will be used to refer to it in the rest of this license. 41 $mess = basename(__FILE__) 42 . ' must be included it can not be ran directly.' . PHP_EOL; 43 if (PHP_SAPI != 'cli') { 73 /** 74 * Function called by Yapeal.php to start section running maintenance scripts. 75 * 101 $class = $this->section . $script; 102 $hash = hash('sha1', $class); 103 // These are passed on to the script class instance and used as partRsa.php https://github.com/Riges/KawaiViewModel.git | PHP | 338 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Rsa.php 24808 2012-05-17 19:56:09Z rob $ 21 */ 25 */ 26require_once 'Zend/Crypt/Rsa/Key/Private.php'; 27 30 */ 31require_once 'Zend/Crypt/Rsa/Key/Public.php'; 32 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.'); 77 // Set _hashAlgorithm property when we are sure, that openssl extension is loaded 78 // and OPENSSL_ALGO_SHA1 constant is available 79 $this->_hashAlgorithm = OPENSSL_ALGO_SHA1;simple_connector.php https://bitbucket.org/angell2438/bsr.git | PHP | 240 lines
1<?php 2class ControllerCommonSimpleConnector extends Controller { 176 public function captcha() { 177 $this->session->data['captcha'] = substr(sha1(mt_rand()), 17, 6); 178MySQLi.php git://github.com/kohana/database.git | PHP | 422 lines
1<?php defined('SYSPATH') OR die('No direct script access.'); 2/** 8 * @copyright (c) 2008-2009 Kohana Team 9 * @license http://kohanaphp.com/license 10 */ 18 19 // Identifier for this connection within the PHP driver 20 protected $_connection_id; 32 // Determine if we can use mysqli_set_charset(), which is only 33 // available on PHP 5.2.3+ when compiled against MySQL 5.0+ 34 Database_MySQLi::$_set_names = ! function_exists('mysqli_set_charset'); 77 78 // \xFF is a better delimiter, but the PHP driver uses underscore 79 $this->_connection_id = sha1($hostname.'_'.$username.'_'.$password); 135 { 136 // PHP is compiled against MySQL 4.x 137 $status = (bool) $this->_connection->query('SET NAMES '.$this->quote($charset));user.php https://github.com/meltingice/Osimo-Forum-System-v1.git | PHP | 381 lines
1<?php 2/* 5* 6* os-includes/ajax/user.php - ajax backend for user modification 7*/ 9include_once('../dbconnect.php'); //connects to database 10include_once('../paths.php'); 11include_once('../osimo.php'); 109 $curPassword = sha1(secureContent($curPassword)); 110 $newPassword = sha1(secureContent($newPassword)); 111 $newPassword2 = sha1(secureContent($newPassword2)); 237 <div id="memberlist-wrap"> 238 <p><?php echo $numMembers; ?> Members | Page <span id="osimo_memberlist-curpage"><?php echo $page; ?></span> of <span id="osimo_memberlist-totpage"><?php echo $osimo->getPagination('table=users', 'num=15'); ?></span></p> 239 <table cellpadding='4' cellspacing='0' id="memberlist"> 248 249 <?php 250 foreach($memberlist as $member)script.cpp https://github.com/bitcoin/bitcoin.git | C++ | 341 lines
3// Distributed under the MIT software license, see the accompanying 4// file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 120 case OP_RIPEMD160 : return "OP_RIPEMD160"; 121 case OP_SHA1 : return "OP_SHA1"; 122 case OP_SHA256 : return "OP_SHA256";GherkinSnippets.php git://github.com/Codeception/Codeception.git | PHP | 152 lines
1<?php 2namespace Codeception\Lib\Generator; 16 { 17 throw new \PHPUnit\Framework\IncompleteTestError("Step `{{text}}` is not defined"); 18 } 118 if (empty($methodName)) { 119 $methodName = 'step_' . substr(sha1($pattern), 0, 9); 120 }LoginAction.php git://github.com/jquery/testswarm.git | PHP | 175 lines
1<?php 2/** 100 $algos = hash_algos(); 101 foreach ( array( 'whirlpool', 'sha256', 'sha1' ) as $choice ) { 102 if ( in_array( $choice, $algos ) ) { 139 } 140 return ':A:' . $salt . ':' . sha1( $salt . '|' . sha1( $password ) ); 141 } 163 list( $salt, $realHash ) = explode( ':', substr( $hash, 3 ), 2 ); 164 return sha1( $salt . '|' . sha1( $input ) ) === $realHash; 165 165 166 // Migrated from old 'users' table (see #generatePasswordHashForUserrow and dbUpdate.php) 167 } elseif ( $type === ':M:' ) { 168 list( $salt, $realHash ) = explode( ':', substr( $hash, 3 ), 2 ); 169 // The old users table stores sha1 of seed + plain password 170 return sha1( $salt . $input ) === $realHash;Weibo.php http://php-opensdk.googlecode.com/svn/trunk/ | PHP | 277 lines
1<?php 2 2 3require_once 'OpenSDK/OAuth/Client.php'; 4require_once 'OpenSDK/OAuth/Interface.php'; 10 * 1?PECL json >= 1.2.0 (no need now) 11 * 2?PHP >= 5.2.0 because json_decode (no need now) 12 * 3?$_SESSION 14 * 15 * only need PHP >= 5.0 16 * 18 * 1??OpenSDK?????include_path 19 * 2?require_once 'OpenSDK/Sohu/Weibo.php'; 20 * 3?OpenSDK_Sohu_Weibo::init($appkey,$appsecret); 26 * ??? 27 * 1?PHP5.2 ?????????Pear??? Service_JSON ???json_decode 28 * 2??? session_set_save_handler ???SESSION???API???????session_startcrc.php http://tux-target.googlecode.com/svn/trunk/ | PHP | 183 lines
6 7 <?php 8 function exec_requete($requete) 36 { 37 $sha1 = $line[0]; 38 $crcDate = $line[1]; 42 echo "uptodate "; 43 return $sha1; 44 } 51 echo "computing ... "; 52 $sha1 = sha1_file($srcName); 53 $command = "nice gzip -c ".$srcName." > ".$gzFilename; 61 echo "$srcName never build : computing ... "; 62 $sha1 = sha1_file($srcName); 63 $command = "nice gzip -c ".$srcName." > ".$gzFilename;ncrypt.d http://kdlib.googlecode.com/svn/trunk/ | D | 252 lines
29alias BCRYPT_MD5_ALGORITHM NCRYPT_MD5_ALGORITHM; 30alias BCRYPT_SHA1_ALGORITHM NCRYPT_SHA1_ALGORITHM; 31alias BCRYPT_SHA256_ALGORITHM NCRYPT_SHA256_ALGORITHM; 107 108export extern(Windows) SECURITY_STATUS NCryptOpenStorageProvider(NCRYPT_PROV_HANDLE* phProvider, LPCWSTR pszProviderName, DWORD dwFlags); 109 243export extern(Windows) BOOL NCryptIsKeyHandle(NCRYPT_KEY_HANDLE hKey); 244export extern(Windows) SECURITY_STATUS NCryptTranslateHandle(NCRYPT_PROV_HANDLE* phProvider, NCRYPT_KEY_HANDLE* phKey, HCRYPTPROV hLegacyProv, HCRYPTKEY hLegacyKey, DWORD dwLegacyKeySpec, DWORD dwFlags); 245export extern(Windows) SECURITY_STATUS NCryptNotifyChangeKey(NCRYPT_PROV_HANDLE hProvider, HANDLE* phEvent, DWORD dwFlags);Event.php https://bitbucket.org/Temesky/resource-management-system-backend.git | PHP | 635 lines
1<?php 2 178 { 179 return 'framework'.DIRECTORY_SEPARATOR.'schedule-'.sha1($this->expression.$this->command); 180 } 393 if (is_null($this->output) || $this->output == $this->getDefaultOutput()) { 394 $this->sendOutputTo(storage_path('logs/schedule-'.sha1($this->mutexName()).'.log')); 395 }smarty_internal_cacheresource_file.php git://github.com/benkeen/generatedata.git | PHP | 264 lines
1<?php 2/** 60 } 61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock'; 62 } 62 } 63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php'; 64 $cached->timestamp = @filemtime($cached->filepath); 162 if (isset($_templateId[150])) { 163 $_templateId = sha1($_templateId); 164 } 229 { 230 if (version_compare(PHP_VERSION, '5.3.0', '>=')) { 231 clearstatcache(true, $cached->lock_id);README.markdown https://github.com/DavertMik/doAuthPlugin.git | Markdown | 276 lines
31 32 [php] 33 class myUser extends doAuthSecurityUser 62 63 [php] 64 $user = new User(); 71 72 [php] 73 $user = $this->getUser(); 90 91 [php] 92 class userActions extends doAuthActions 97 98 [php] 99 class frontendConfiguration extends sfApplicationConfigurationpaymentrequestplus.cpp git://github.com/bitcoin/bitcoin.git | C++ | 208 lines
2// Distributed under the MIT software license, see the accompanying 3// file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 72 } 73 else if (paymentRequest.pki_type() == "x509+sha1") { 74 digestAlgorithm = EVP_sha1();filescheck.php https://bitbucket.org/programmerlab/ourteam.co.in.git | PHP | 272 lines
52 53 /** @var bool Is the fileslist.php reporting a version different than the reported component version? */ 54 protected $wrongFilesVersion = false; 112 113 // Make sure the fileslist.php version and date match the component's version 114 if ($this->version != $phpFileChecker['version']) 124 // Initialise the files and directories lists 125 $this->fileList = $phpFileChecker['files']; 126 $this->dirList = $phpFileChecker['directories']; 240 { 241 $fileSha1 = @sha1_file($filePath); 242 244 { 245 $ret['files'][] = $fileKey . ' (SHA1 ' . $fileSha1 . ' ≠ ' . $fileData[2] . ')'; 246 }ajax.php http://marocmall.googlecode.com/svn/trunk/ | PHP | 131 lines
1<?php 2 2 3include_once('../../config/config.inc.php'); 4include_once('../../init.php'); 4include_once('../../init.php'); 5include_once('../../modules/shopimporter/shopimporter.php'); 6ini_set('display_errors', 'off'); 7 8if (!Tools::getValue('ajax') OR Tools::getValue('token') != sha1(_COOKIE_KEY_.'ajaxShopImporter')) 9 die; 52 53 if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) 54 { 54 { 55 require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); 56 $importModule = new $moduleName();opent.php http://ownerpress.googlecode.com/svn/trunk/ | PHP | 337 lines
1<?php 2/** 7 */ 8require_once 'OAuth.php'; 9 22 //function authenticateURL() { return 'http://open.t.qq.com/cgi-bin/authenticate'; } 23 function authenticateURL() { return 'http://open.t.qq.com/oauth_html/loginnew.php'; } 24 function authorizeURL() { return 'http://open.t.qq.com/cgi-bin/authorize'; } 24 function authorizeURL() { return 'http://open.t.qq.com/cgi-bin/authorize'; } 25 function mobelURL() { return 'https://open.t.qq.com/oauth_html/mobel.php'; } 26 function requestTokenURL() { return 'https://open.t.qq.com/cgi-bin/request_token'; } 30 function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { 31 $this->sha1_method = new TencentOAuthSignatureMethod_HMAC_SHA1(); 32 $this->consumer = new TencentOAuthConsumer($consumer_key, $consumer_secret); 141 break; 142 //require_once MB_COMM_DIR.'/api_errcode.class.php'; 143 //$msg = ApiErrCode::getMsg($errcode);affiliate.php https://bitbucket.org/wwwebexpert/sample-code.git | PHP | 180 lines
1<?php 2class ModelAffiliateAffiliate extends Model { 3 public function addAffiliate($data) { 4 $this->db->query("INSERT INTO " . DB_PREFIX . "affiliate SET firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', salt = '" . $this->db->escape($salt = token(9)) . "', password = '" . $this->db->escape(sha1($salt . sha1($salt . sha1($data['password'])))) . "', company = '" . $this->db->escape($data['company']) . "', website = '" . $this->db->escape($data['website']) . "', address_1 = '" . $this->db->escape($data['address_1']) . "', address_2 = '" . $this->db->escape($data['address_2']) . "', city = '" . $this->db->escape($data['city']) . "', postcode = '" . $this->db->escape($data['postcode']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "', code = '" . $this->db->escape(uniqid()) . "', commission = '" . (float)$this->config->get('config_affiliate_commission') . "', tax = '" . $this->db->escape($data['tax']) . "', payment = '" . $this->db->escape($data['payment']) . "', cheque = '" . $this->db->escape($data['cheque']) . "', paypal = '" . $this->db->escape($data['paypal']) . "', bank_name = '" . $this->db->escape($data['bank_name']) . "', bank_branch_number = '" . $this->db->escape($data['bank_branch_number']) . "', bank_swift_code = '" . $this->db->escape($data['bank_swift_code']) . "', bank_account_name = '" . $this->db->escape($data['bank_account_name']) . "', bank_account_number = '" . $this->db->escape($data['bank_account_number']) . "', status = '1', approved = '" . (int)!$this->config->get('config_affiliate_approval') . "', date_added = NOW()"); 5 90 public function editPassword($email, $password) { 91 $this->db->query("UPDATE " . DB_PREFIX . "affiliate SET salt = '" . $this->db->escape($salt = token(9)) . "', password = '" . $this->db->escape(sha1($salt . sha1($salt . sha1($password)))) . "' WHERE LOWER(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); 92 }profile.php https://github.com/flagcapper/aichallenge.git | PHP | 322 lines
1<?php 2// ini_set('error_reporting', E_ALL); 4 5require_once('header.php'); 6require_once('mysql_login.php'); 6require_once('mysql_login.php'); 7require_once('nice.php'); 8 16if (!isset($user_id)) { 17 require_once('footer.php'); 18 die(); 20 21require_once('profile_submissions_widget.php'); 22require_once('profile_games_widget.php'); 22require_once('profile_games_widget.php'); 23require_once('game_list.php'); 24email_socket.php https://github.com/dakota/infinitas.git | PHP | 505 lines
1<?php 2 //App::import('Libs', 'Libs.BaseSocket'); 292 if(!$this->__cacheKey){ 293 $this->__cacheKey = sha1(serialize(array($this->config['host'], $this->config['type'], $this->config['port'], $this->config['ssl']))); 294 } 301 * 302 * @link http://api13.cakephp.org/class/cache#method-Cacheread 303 * 316 * 317 * @link http://api13.cakephp.org/class/cache#method-Cachewrite 318 *Oauth.php https://github.com/rchavik/cakephp.git | PHP | 372 lines
2/** 3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) 4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) 9 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) 10 * @link https://cakephp.org CakePHP(tm) Project 11 * @since 3.0.0 11 * @since 3.0.0 12 * @license https://opensource.org/licenses/mit-license.php MIT License 13 */ 47 if (empty($credentials['method'])) { 48 $credentials['method'] = 'hmac-sha1'; 49 } 129 */ 130 protected function _hmacSha1($request, $credentials) 131 {consumer.rb https://github.com/tomtaylor/iamnear.git | Ruby | 347 lines
19 @@default_options = { 20 # Signature method used by server. Defaults to HMAC-SHA1 21 :signature_method => 'HMAC-SHA1', 53 # :http_method => :post, 54 # :request_token_path => "/oauth/example/request_token.php", 55 # :access_token_path => "/oauth/example/access_token.php", 55 # :access_token_path => "/oauth/example/access_token.php", 56 # :authorize_path => "/oauth/example/authorize.php" 57 # })git.class.php git://github.com/patrikf/glip.git | PHP | 438 lines
1<?php 2/* 25require_once('git_commit_stamp.class.php'); 26require_once('git_tree.class.php'); 27 34 */ 35function sha1_bin($hex) 36{ 283 284 /* compare sha1_file.c:1608 unpack_entry */ 285 if ($type == Git::OBJ_COMMIT || $type == Git::OBJ_TREE || $type == Git::OBJ_BLOB || $type == Git::OBJ_TAG) 291 * 292 * FIXME use PHP stream filter API as soon as it behaves 293 * consistently 357 return $cache[$object_name]; 358 $sha1 = sha1_hex($object_name); 359 $path = sprintf('%s/objects/%s/%s', $this->dir, substr($sha1, 0, 2), substr($sha1, 2));StringTest.php https://github.com/fabpot/framework-benchs.git | PHP | 433 lines
1<?php 2/** 2/** 3 * Lithium: the most rad php framework 4 * 5 * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org) 6 * @license http://opensource.org/licenses/bsd-license.php The BSD License 7 */ 88 89 $expected = sha1($value); 90 $result = String::hash($value, 'sha1'); 95 96 $expected = sha1($salt . $value); 97 $result = String::hash($value, 'sha1', $salt);vcs_git.php https://github.com/yak/virtualmeet-vcs-tools.git | PHP | 303 lines
1<?php 2 2 3require_once('shell.php'); 4require_once('commit.php'); 16 * @copyright 2009 Kristoffer Lindqvist 17 * @license http://www.opensource.org/licenses/mit-license.php MIT license 18 */ 232 if (strlen($commit_id) !== 40) { 233 throw new GitException('Commit is not a SHA1 hash: ' . $commit_id); 234 }install.php git://pkgs.fedoraproject.org/sticky-notes | PHP | 136 lines
1<?php 2/** 4* @ver 0.3 5* @license BSD License - www.opensource.org/licenses/bsd-license.php 6* 14// Include necessary files 15include_once('init.php'); 16 21// Check is config file is present 22if (!file_exists(realpath('config.php'))) 23{ 23{ 24 $gsod->trigger('Config file not found. Please rename config.sample.php to ' . 25 'config.php and make it writable.'); 117$salt = substr(sha1(time()), rand(0, 34), 5); 118$password = substr(sha1(sha1(time())), rand(0, 31), 8); 119$hash = sha1($password . $salt);Auth_OpenID_DiffieHellmanSHA256ServerSession.html https://github.com/AlexChien/EY_BBS.git | HTML | 246 lines
26 <p class="notes"> 27 Located in <a class="field" href="_Auth---OpenID---Server.php.html">/Auth/OpenID/Server.php</a> (line <span class="field">549</span>) 28 </p> 166 <dl> 167 <dt><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#var$session_type">Auth_OpenID_DiffieHellmanSHA1ServerSession::$session_type</a></dt> 168 <dd>An object that knows how to handle association requests with the Diffie-Hellman session type.</dd> 175 <A NAME='inherited_vars'><!-- --></A> 176 <p>Inherited from <span class="classname"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html">Auth_OpenID_DiffieHellmanSHA1ServerSession</a></span></p> 177 <blockquote> 178 <span class="var-title"> 179 <span class="var-name"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#var$needs_math">Auth_OpenID_DiffieHellmanSHA1ServerSession::$needs_math</a></span><br> 180 </span> 231 <blockquote> 232 <span class="method-name"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#methodAuth_OpenID_DiffieHellmanSHA1ServerSession">Auth_OpenID_DiffieHellmanSHA1ServerSession::Auth_OpenID_DiffieHellmanSHA1ServerSession()</a></span><br> 233 <span class="method-name"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#methodanswer">Auth_OpenID_DiffieHellmanSHA1ServerSession::answer()</a></span><br>ReplicationStrategy.php git://github.com/nrk/predis.git | PHP | 304 lines
64 if (($eval = $id === 'EVAL') || $id === 'EVALSHA') { 65 $sha1 = $eval ? sha1($command->getArgument(0)) : $command->getArgument(0); 66 66 67 if (isset($this->readonlySHA1[$sha1])) { 68 if (true === $readonly = $this->readonlySHA1[$sha1]) { 200 { 201 $sha1 = sha1($script); 202 203 if ($readonly) { 204 $this->readonlySHA1[$sha1] = $readonly; 205 } else { 205 } else { 206 unset($this->readonlySHA1[$sha1]); 207 }access.class.php http://xfw-xkid-framework.googlecode.com/svn/trunk/ | PHP | 345 lines
1<?php 2/** 2/** 3 * PHP Class to user access (login, register, logout, etc) 4 * 4 * 5 * <code><?php 6 * include('access.class.php'); 10 * For support issues please refer to the webdigity forums : 11 * http://www.webdigity.com/index.php/board,91.0.html 12 * or the official web site: 12 * or the official web site: 13 * http://phpUserClass.com/ 14 * ============================================================================== 15 * 16 * @version $Id: access.class.php,v 0.93 2008/05/02 10:54:32 $ 17 * @copyright Copyright (c) 2007 Nick Papanotas (http://www.webdigity.com)AttachmentAbstract.php git://github.com/thorsten/phpMyFAQ.git | PHP | 433 lines
1<?php 2 9 * 10 * @package phpMyFAQ 11 * @author Anatoliy Belsky <ab@php.net> 11 * @author Anatoliy Belsky <ab@php.net> 12 * @copyright 2009-2021 phpMyFAQ Team 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 14 * @link https://www.phpmyfaq.de 15 * @since 2009-08-21 17 18namespace phpMyFAQ\Attachment; 19 19 20use phpMyFAQ\Database; 21use phpMyFAQ\Database\DatabaseDriver;DomainKeySigner.php git://github.com/swiftmailer/swiftmailer.git | PHP | 504 lines
1<?php 2 43 */ 44 protected $hashAlgorithm = 'rsa-sha1'; 45 237 /** 238 * Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256. 239 * 245 { 246 $this->hashAlgorithm = 'rsa-sha1'; 247 479 switch ($this->hashAlgorithm) { 480 case 'rsa-sha1': 481 $this->hashHandler = hash_init('sha1'); 498 } 499 if (openssl_sign($this->canonData, $signature, $pkeyId, OPENSSL_ALGO_SHA1)) { 500 return $signature;Nova_auth.php https://github.com/anodyne/nova.git | PHP | 587 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 137 // double hash the UID 138 $uid = sha1(sha1($uid)); 139 140 // hash the string with the salt 141 $string = sha1($uid . $string); 142aws_s3.php git://github.com/gallery/gallery3-contrib.git | PHP | 330 lines
1<?php defined("SYSPATH") or die("No direct script access."); 2 12 if (!self::$_s3) { 13 require_once(MODPATH . "aws_s3/lib/s3.php"); 14 S3::setAuth(module::get_var("aws_s3", "access_key"), module::get_var("aws_s3", "secret_key")); 21 return base64_encode(extension_loaded('hash') ? 22 hash_hmac('sha1', $string, module::get_var("aws_s3", "secret_key"), true) : pack('H*', sha1( 23 (str_pad(module::get_var("aws_s3", "secret_key"), 64, chr(0x00)) ^ (str_repeat(chr(0x5c), 64))) . 23 (str_pad(module::get_var("aws_s3", "secret_key"), 64, chr(0x00)) ^ (str_repeat(chr(0x5c), 64))) . 24 pack('H*', sha1((str_pad(module::get_var("aws_s3", "secret_key"), 64, chr(0x00)) ^ 25 (str_repeat(chr(0x36), 64))) . $string))))); 234 static function validate_access_details($access_key, $secret_key, $bucket_name) { 235 require_once(MODPATH . "aws_s3/lib/s3.php"); 236 S3::setAuth($access_key, $secret_key);customer.php https://bitbucket.org/Hibiki08/goodlack.git | PHP | 178 lines
1<?php 2class ModelAccountCustomer extends Model { 13 14 $this->db->query("INSERT INTO " . DB_PREFIX . "customer SET customer_group_id = '" . (int)$customer_group_id . "', store_id = '" . (int)$this->config->get('config_store_id') . "', language_id = '" . (int)$this->config->get('config_language_id') . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', custom_field = '" . $this->db->escape(isset($data['custom_field']['account']) ? json_encode($data['custom_field']['account']) : '') . "', salt = '" . $this->db->escape($salt = token(9)) . "', password = '" . $this->db->escape(sha1($salt . sha1($salt . sha1($data['password'])))) . "', newsletter = '" . (isset($data['newsletter']) ? (int)$data['newsletter'] : 0) . "', ip = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "', status = '1', approved = '" . (int)!$customer_group_info['approval'] . "', date_added = NOW()"); 15 103 public function editPassword($email, $password) { 104 $this->db->query("UPDATE " . DB_PREFIX . "customer SET salt = '" . $this->db->escape($salt = token(9)) . "', password = '" . $this->db->escape(sha1($salt . sha1($salt . sha1($password)))) . "', code = '' WHERE LOWER(email) = '" . $this->db->escape(utf8_strtolower($email)) . "'"); 105 }OauthPlugin.php https://bitbucket.org/yerdna/wp-dospaces.git | PHP | 241 lines
1<?php 2 42 { 43 $this->config = \DeliciousBrains\WP_Offload_S3\Aws2\Guzzle\Common\Collection::fromConfig($config, array('version' => '1.0', 'request_method' => self::REQUEST_METHOD_HEADER, 'consumer_key' => 'anonymous', 'consumer_secret' => 'anonymous', 'signature_method' => 'HMAC-SHA1', 'signature_callback' => function ($stringToSign, $key) { 44 return hash_hmac('sha1', $stringToSign, $key, true); 202 { 203 return sha1(uniqid('', true) . $request->getUrl()); 204 }GetFileController.php https://gitlab.com/casiazul/colectivoweb.git | PHP | 314 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 37 $filename = Tools::getValue('file'); 38 if (!Validate::isSha1($filename)) 39 die(Tools::displayError()); 51 if (!file_exists($file)) 52 Tools::redirect('index.php'); 53 } 60 if (!$this->context->customer->isLogged() && !Tools::getValue('secure_key') && !Tools::getValue('id_order')) 61 Tools::redirect('index.php?controller=authentication&back=get-file.php&key='.$key); 62 else if (!$this->context->customer->isLogged() && Tools::getValue('secure_key') && Tools::getValue('id_order'))processEditUser.php http://find-it.googlecode.com/svn/trunk/ | PHP | 132 lines
1<?php 2$errors = array(); 4 // run the validation script 5 require_once('library.php'); 6 try { 101 102 'password' => sha1($_POST['password']), 103 'accessLevel' => $_POST 109 $dbWrite->update('users', $data, 'userId = '.$_GET['userId']); 110 header('Location: UserList.php'); 111 } else if($userNameChanged) { 115 'userName' => $_POST['userName'], 116 'password' => sha1($_POST['password']), 117 'accessLevel' => $_POST 123 $dbWrite->update('users', $data, 'userId = '.$_GET['userId']); 124 header('Location: UserList.php'); 125 }is_user.php http://viet-group.googlecode.com/svn/trunk/ | PHP | 164 lines
1<?php 2 20{ 21 require_once ( NV_ROOTDIR . '/' . DIR_FORUM . '/nukeviet/is_user.php' ); 22 if ( isset( $user_info['userid'] ) and $user_info['userid'] > 0 ) 74 $user = unserialize( nv_base64_decode( $_user ) ); 75 $strlen = ( NV_CRYPT_SHA1 == 1 ) ? 40 : 32; 76PageCacheEnablerListener.php https://bitbucket.org/joeherold/pagecacheenabler-bundle.git | PHP | 236 lines
1<?php 2 233 234 return sha1($strHash); 235 }upgrade.php https://github.com/totara/moodle.git | PHP | 324 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 85 if ($oldversion < 2013081301) { 86 require_once($CFG->dirroot . '/mod/scorm/lib.php'); 87 $scorms = $DB->get_recordset('scorm', array('scormtype' => 'imsrepository')); 91 $scorm->reference = $CFG->repository.substr($scorm->reference, 1).'/imsmanifest.xml'; 92 $scorm->sha1hash = sha1($scorm->reference); 93 } 166 if (!empty($hide)) { 167 require_once($CFG->dirroot . '/mod/scorm/lib.php'); 168 set_config('nav', SCORM_NAV_DISABLED, 'scorm');elementindex_phpUserClass.html https://github.com/HumanWorks/phpUserClass.git | HTML | 200 lines
32 Files:<br> 33 <a href="phpUserClass/_access.class.php.html"> access.class.php 34 </a><br> 66 <dt>access.class.php</dt> 67 <dd>procedural page <a href="phpUserClass/_access.class.php.html">access.class.php</a></dd> 68 <dt>activate</dt> 126 <dt>is_loaded</dt> 127 <dd>in file access.class.php, method <a href="phpUserClass/flexibleAccess.html#methodis_loaded">flexibleAccess::is_loaded()</a><br> Is the user loaded?</dd> 128 </dl> 137 <dt>logout</dt> 138 <dd>in file access.class.php, method <a href="phpUserClass/flexibleAccess.html#methodlogout">flexibleAccess::logout()</a><br> Logout function</dd> 139 </dl> 146 <dt>$passMethod</dt> 147 <dd>in file access.class.php, variable <a href="phpUserClass/flexibleAccess.html#var$passMethod">flexibleAccess::$passMethod</a><br> The method used to encrypt the password. It can be sha1, md5 or nothing (no encryption)</dd> 148 </dl>queue.php https://gitlab.com/sim6/friendica.git | PHP | 270 lines
16 $params = get_feed_for($a, '', $rr['nickname'], $rr['last_update']); 17 $hmac_sig = hash_hmac("sha1", $params, $rr['secret']); 18 23 $rr['topic']), 24 "X-Hub-Signature: sha1=" . $hmac_sig); 25 77 78 require_once("include/session.php"); 79 require_once("include/datetime.php"); 95 // Calling a new instance 96 proc_run('php',"include/queue.php"); 97 } 122 logger('queue: deliverq'); 123 proc_run('php','include/delivery.php',$rr['cmd'],$rr['item'],$rr['contact']); 124 if($interval)BasesfGuardUser.class.php https://github.com/stephaneerard/asandbox.git | PHP | 199 lines
1<?php 2 78 * @author Your name here 79 * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ 80 */ 99 'type' => 'string', 100 'default' => 'sha1', 101 'notnull' => true,Auth_OpenID_DiffieHellmanSHA256ServerSession.html https://github.com/brondsem/familysite.git | HTML | 246 lines
26 <p class="notes"> 27 Located in <a class="field" href="_Auth---OpenID---Server.php.html">/Auth/OpenID/Server.php</a> (line <span class="field">555</span>) 28 </p> 166 <dl> 167 <dt><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#var$session_type">Auth_OpenID_DiffieHellmanSHA1ServerSession::$session_type</a></dt> 168 <dd>An object that knows how to handle association requests with the Diffie-Hellman session type.</dd> 175 <A NAME='inherited_vars'><!-- --></A> 176 <p>Inherited from <span class="classname"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html">Auth_OpenID_DiffieHellmanSHA1ServerSession</a></span></p> 177 <blockquote> 178 <span class="var-title"> 179 <span class="var-name"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#var$needs_math">Auth_OpenID_DiffieHellmanSHA1ServerSession::$needs_math</a></span><br> 180 </span> 231 <blockquote> 232 <span class="method-name"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#methodAuth_OpenID_DiffieHellmanSHA1ServerSession">Auth_OpenID_DiffieHellmanSHA1ServerSession::Auth_OpenID_DiffieHellmanSHA1ServerSession()</a></span><br> 233 <span class="method-name"><a href="../OpenID/Auth_OpenID_DiffieHellmanSHA1ServerSession.html#methodanswer">Auth_OpenID_DiffieHellmanSHA1ServerSession::answer()</a></span><br>login.php https://github.com/radicalsuz/amp.git | PHP | 226 lines
52 $sha1_in_db = (strlen($db_password_hash) == 40) ? true : false; 53 $sha1_available = (function_exists('sha1') || function_exists('mhash')) ? true : false; 54 56 57 if ($sha1_in_db && $sha1_available && $db_password_hash == $form_password_hash) 58 $authorized = true; 179 </div> 180 <p><input type="submit" name="request_pass" value="<?php echo $lang_common['Submit'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p> 181 </form> 193// Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) 194$redirect_url = (isset($_SERVER['HTTP_REFERER']) && preg_match('#^'.preg_quote($pun_config['o_base_url']).'/(.*?)\.php#i', $_SERVER['HTTP_REFERER'])) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : 'index.php'; 195 215 <p><a href="register.php" tabindex="4"><?php echo $lang_login['Not registered'] ?></a> 216 <a href="login.php?action=forget" tabindex="5"><?php echo $lang_login['Forgotten pass'] ?></a></p> 217 </div>auth.php https://bitbucket.org/scoates/mtrack | PHP | 433 lines
1<?php # vim:ts=2:sw=2:et: 2/* For licensing and copyright terms, see the file named LICENSE */ 123 124 /* PHP based auth */ 125 if (($this->use_digest && isset($_SERVER['PHP_AUTH_DIGEST'])) || 125 if (($this->use_digest && isset($_SERVER['PHP_AUTH_DIGEST'])) || 126 (!$this->use_digest && isset($_SERVER['PHP_AUTH_USER']))) 127 { 132 133 $DIG = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']); 134 143 $domain = $_GLOBALS['ABSWEB']; 144 $opaque = sha1($domain . $secret); 145 153 } else { 154 $user = $_SERVER['PHP_AUTH_USER']; 155 }filepart.act.php http://awarenet.googlecode.com/svn/trunk/ | PHP | 66 lines
2 3 require_once($kapenta->installPath . 'modules/p2p/models/peer.mod.php'); 4 require_once($kapenta->installPath . 'modules/p2p/inc/klargefile.class.php'); 12//+ <path>data/videos/1/2/3/12345678.flv</path> 13//+ <hash>[sha1 hash of part]</hash> 14//+ <size>512</size> 58 if ('' == $raw) { $page->doXmlError('Part could not be loaded: ' . $detail['index'] . '.'); } 59 if (sha1($raw) != $detail['hash']) { $page->doXmlError('Hash mismatch.'); } 60script.h https://github.com/dooglus/bitcoin.git | C Header | 571 lines
3// Distributed under the MIT/X11 software license, see the accompanying 4// file license.txt or http://www.opensource.org/licenses/mit-license.php. 5#ifndef H_BITCOIN_SCRIPT 150 OP_RIPEMD160, 151 OP_SHA1, 152 OP_SHA256,README.markdown https://github.com/bauhouse/Piano-Sonata.git | Markdown | 176 lines
15 16- PHP 5.2 or above (PHP 5.3 recommended) 17- PHP's LibXML module, with the XSLT extension enabled (`--with-xsl`) 23 24Symphony makes use of PHP's built in `json` functions which are enabled by default in PHP 5.2 and above. If they are missing, ensure PHP wasn't compiled with `--disable-json` 25 27 28While Windows is not officially supported for production, we understand many developers use WAMP for Symphony development before deploying to a production server. The Symphony team recommends that while using WAMP, developers use the latest PHP 5.3.x version during development to minimise any potential issues. PHP5.3 provides numerous fixes and improvements to help minimise and standardise the result of several functions that behave slightly differently depending on the OS 29 41 42As of version `2.1`, Symphony stores passwords using the more secure [SHA1](http://php.net/sha1) algorithm (previous versions used MD5). When updating to `2.1`, the primary user's login password will be reset (the new password will be displayed by the updater—please note it). **Please also note that all other users' passwords will no longer be valid and will require a manual reset through Symphony's forgotten password feature.** Alternatively, as an administrator, you can also change your users' passwords on their behalf. 43 82 831. Upload `/symphony`, `index.php` & `update.php`, replacing what is already on your server. 84AssetFactory.php https://github.com/ivanrey/Symfony-Community.git | PHP | 251 lines
1<?php 2 175 { 176 return substr(sha1(serialize(array_merge($inputs, $filters))), 0, 7); 177 }Compiler.php git://github.com/composer/composer.git | PHP | 293 lines
74 $phar = new \Phar($pharFile, 0, 'composer.phar'); 75 $phar->setSignatureAlgorithm(\Phar::SHA1); 76 87 ->notName('Compiler.php') 88 ->notName('ClassLoader.php') 89 ->in(__DIR__.'/..') 95 } 96 $this->addFile($phar, new \SplFileInfo(__DIR__ . '/Autoload/ClassLoader.php'), false); 97 143 $this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/composer/InstalledVersions.php')); 144 if (file_exists(__DIR__.'/../../vendor/composer/platform_check.php')) { 145 $this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/composer/platform_check.php')); 272 fwrite(STDERR, 'Warning: APC <= 3.0.12 may cause fatal errors when running composer commands.'.PHP_EOL); 273 fwrite(STDERR, 'Update APC, or set apc.enable_cli or apc.cache_by_default to 0 in your php.ini.'.PHP_EOL); 274 }Util.php https://github.com/pct/4money.git | PHP | 389 lines
1<?php 2/** 2/** 3 * Slim - a micro PHP 5 framework 4 * 191 { 192 $key = hash_hmac('sha1', $expires, $secret); 193 $iv = self::get_iv($expires, $secret); 197 ))); 198 $verificationString = hash_hmac('sha1', $expires . $value, $key); 199 221 if (count($value) === 3 && ((int) $value[0] === 0 || (int) $value[0] > time())) { 222 $key = hash_hmac('sha1', $value[0], $secret); 223 $iv = self::get_iv($value[0], $secret); 304 * instead of PHP's native `setcookie` method. This allows more control of the HTTP header 305 * irrespective of PHP's native implementation's dependency on PHP versions. 306 *twitteroauth.php https://bitbucket.org/huanui/huanui-trunk/ | PHP | 246 lines
1<?php 2 5 * 6 * The first PHP Library to support OAuth for Twitter's REST API. 7 */ 9/* Load OAuth lib. You can find it at http://oauth.net */ 10require_once('OAuth.php'); 11 59 function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { 60 $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); 61 $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); 182 $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters); 183 $request->sign_request($this->sha1_method, $this->consumer, $this->token); 184 switch ($method) {urlbuilder.inc.php https://github.com/jvinet/pronto.git | PHP | 189 lines
1<?PHP 2 24 25 require_once(dirname(__FILE__) . '/keymanager.inc.php'); 26 101 'openid.mode' => 'associate', 102 'openid.assoc_type' => 'HMAC-SHA1', 103 ); 105 if (KeyManager::supportsDH()) { 106 $args['openid.session_type'] = 'DH-SHA1'; 107 $args['openid.dh_modulus'] = KeyManager::getDhModulus();