/
home
/
desid573
/
public_html
/
gcdriver
/
payment
/
pdd
/
app
/
Vendor
/
Services
/
Twilio
/
/home/desid573/public_html/gcdriver/payment/pdd/app/Vendor/Services/Twilio
mkdir
upload
Name
Size
Mode
Actions
Auth/
-
0755
rm
Rest/
-
0755
rm
TaskRouter/
-
0755
rm
AccessToken.php
2997
0644
edit
dl
rm
AutoPagingIterator.php
2834
0644
edit
dl
rm
Capability.php
5409
0644
edit
dl
rm
HttpException.php
68
0644
edit
dl
rm
HttpStream.php
3015
0644
edit
dl
rm
InstanceResource.php
2796
0644
edit
dl
rm
IPMessagingInstanceResource.php
487
0644
edit
dl
rm
IPMessagingListResource.php
639
0644
edit
dl
rm
JWT.php
5275
0644
edit
dl
rm
ListResource.php
6227
0644
edit
dl
rm
LookupsInstanceResource.php
479
0644
edit
dl
rm
LookupsListResource.php
1275
0644
edit
dl
rm
MonitorInstanceResource.php
479
0644
edit
dl
rm
MonitorListResource.php
631
0644
edit
dl
rm
NextGenInstanceResource.php
690
0644
edit
dl
rm
NextGenListResource.php
1810
0644
edit
dl
rm
NumberType.php
1076
0644
edit
dl
rm
Page.php
1414
0644
edit
dl
rm
PartialApplicationHelper.php
1067
0644
edit
dl
rm
PricingInstanceResource.php
477
0644
edit
dl
rm
PricingListResource.php
395
0644
edit
dl
rm
RequestValidator.php
1714
0644
edit
dl
rm
Resource.php
3697
0644
edit
dl
rm
RestException.php
1092
0644
edit
dl
rm
SIPListResource.php
386
0644
edit
dl
rm
TaskRouterInstanceResource.php
725
0644
edit
dl
rm
TaskRouterListResource.php
878
0644
edit
dl
rm
TimeRangeResource.php
1146
0644
edit
dl
rm
TinyHttp.php
4582
0644
edit
dl
rm
TrunkingInstanceResource.php
481
0644
edit
dl
rm
TrunkingListResource.php
1160
0644
edit
dl
rm
Twiml.php
4373
0644
edit
dl
rm
UsageResource.php
661
0644
edit
dl
rm
WorkflowConfiguration.php
2539
0644
edit
dl
rm
Edit:
/home/desid573/public_html/gcdriver/payment/pdd/app/Vendor/Services/Twilio/RequestValidator.php
(1714B)
<?php class Services_Twilio_RequestValidator { protected $AuthToken; function __construct($token) { $this->AuthToken = $token; } public function computeSignature($url, $data = array()) { // sort the array by keys ksort($data); // append them to the data string in order // with no delimiters foreach($data as $key => $value) $url .= "$key$value"; // This function calculates the HMAC hash of the data with the key // passed in // Note: hash_hmac requires PHP 5 >= 5.1.2 or PECL hash:1.1-1.5 // Or http://pear.php.net/package/Crypt_HMAC/ return base64_encode(hash_hmac("sha1", $url, $this->AuthToken, true)); } public function validate($expectedSignature, $url, $data = array()) { return self::compare( $this->computeSignature($url, $data), $expectedSignature ); } /** * Time insensitive compare, function's runtime is governed by the length * of the first argument, not the difference between the arguments. * @param $a string First part of the comparison pair * @param $b string Second part of the comparison pair * @return bool True if $a == $b, false otherwise. */ public static function compare($a, $b) { $result = true; if (strlen($a) != strlen($b)) { return false; } if (!$a && !$b) { return true; } $limit = strlen($a); for ($i = 0; $i < $limit; ++$i) { if ($a[$i] != $b[$i]) { $result = false; } } return $result; } }
Save
cmd:
run