Skip to content

Releases

v1.1.1

Choose a tag to compare

@Noorani-MM Noorani-MM released this 23 Aug 11:01

Full Changelog: v1.0.0-beta...v1.1.1

  1. Bugs in decryption fixed.
  2. New methods added.
  3. Document updated.

Whats new in decryption ❓

  • If you want to decrypt file by path you should use
use NooraniMm\SecurePicture\Facades\SecureImage;

$decrypted_data = SecureImage::decryptByPath('encrypted.jpg');
  • If you want to decrypt and store it by path you should use
use \NooraniMm\SecurePicture\Facades\SecureImage;

SecureImage::decryptedByPathAndStore('encrypted.jpg', 'output.jpg');

v1.1.0-beta

Choose a tag to compare

@Noorani-MM Noorani-MM released this 22 Aug 11:14

Secure picture 🔐

Make your image files secure by this package.

Install package

composer require noorani-mm/secure-image

Laravel 11, installation

In bootstrap\providers.php file add line below.

return [
    // Other providers... 
    \NooraniMm\SecurePicture\Providers\SecureImageProvider::class,
];

Older Laravel installation

in config/app.php find providers and add line below.

'providers' => [
    // Other providers...
    \NooraniMm\SecurePicture\Providers\SecureImageProvider::class,
    ]

How to use 🛠

Encryption

use \NooraniMm\SecurePicture\Facades\SecureImage;

$encrypted_content = SecureImage::encrypt('picture.jpg');
  • If you want to encrypt and store file you should use
use NooraniMm\SecurePicture\Facades\SecureImage;

SecureImage::storeAsEncrypted('picture.jpg', 'encrypted.jpg');

Decryption

use \NooraniMm\SecurePicture\Facades\SecureImage;

$decrypted_content = SecureImage::decrypt('encrypted.jpg');
  • If you want to store decrypted file you should use
use \NooraniMm\SecurePicture\Facades\SecureImage;

SecureImage::storeAsDecrypted('encrypted.jpg', 'output.jpg');