This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "what is your project name ?" | |
read project_name | |
echo "what is your repo ?" | |
read repo | |
echo "what is your branch ?" | |
read branch | |
echo "what php version you want to use ?" | |
echo "1) 7.4" | |
echo "2) 8.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first create sign function and pass the private key and the passphrase if needed | |
public function sign(string $data): string | |
{ | |
$privateKey = openssl_pkey_get_private($the_private_key_file,$passphrase_if_needed); | |
if (!$privateKey) { | |
throw new Exception("Failed to load private key : " . openssl_error_string()); | |
} | |
// sign data using the private key with SHA256 algorithm | |
$encryptedData = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Spatie\Image\Image; | |
use Spatie\Image\Manipulations; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; |