ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/timbrature/NH-HR-test/ds/php/plugins/sendgrid/lib/eventwebhook
/
home
mhhtmff
timbrature
NH-HR-test
ds
php
plugins
sendgrid
lib
eventwebhook
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
EventWebhook.php
1.5 MB
chmod
View
DL
Edit
Rename
Delete
EventWebhookHeader.php
422 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/timbrature/NH-HR-test/ds/php/plugins/sendgrid/lib/eventwebhook/EventWebhook.php
<?php namespace SendGrid\EventWebhook; use EllipticCurve\Ecdsa; use EllipticCurve\PublicKey; use EllipticCurve\Signature; /** * This class allows you to use the Event Webhook feature. Read the docs for * more details: https://sendgrid.com/docs/for-developers/tracking-events/event * * @package SendGrid\EventWebhook */ class EventWebhook { /** * Convert the public key string to a ECPublicKey. * * @param string $publicKey verification key under Mail Settings * @return PublicKey public key using the ECDSA algorithm */ public function convertPublicKeyToECDSA($publicKey) { return PublicKey::fromString($publicKey); } /** * Verify signed event webhook requests. * * @param PublicKey $publicKey elliptic curve public key * @param string $payload event payload in the request body * @param string $signature value obtained from the * 'X-Twilio-Email-Event-Webhook-Signature' header * @param string $timestamp value obtained from the * 'X-Twilio-Email-Event-Webhook-Timestamp' header * @return bool true or false if signature is valid */ public function verifySignature($publicKey, $payload, $signature, $timestamp) { $timestampedPayload = $timestamp . $payload; $decodedSignature = Signature::fromBase64($signature); return Ecdsa::verify($timestampedPayload, $decodedSignature, $publicKey); } }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply