Download the PHP package kodhe/encrypt without Composer

On this page you can find all versions of the php package kodhe/encrypt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package encrypt

Kodhe Encrypt - Modernized CI3 Encrypt Library

Library enkripsi modern untuk CodeIgniter 3 dengan dukungan OpenSSL, menggantikan library mcrypt yang sudah deprecated.

โš ๏ธ DEPRECATED NOTICE

Library ini DEPRECATED dan dipertahankan hanya untuk backward compatibility. Untuk proyek baru, gunakan library Encryption resmi CodeIgniter 3 yang berbasis OpenSSL.

๐Ÿš€ Fitur Utama

๐Ÿ“ฆ Instalasi

Atau tambahkan ke composer.json:

๐Ÿ”ง Konfigurasi

Tambahkan di application/config/config.php:

PENTING: Gunakan key minimal 32 karakter untuk keamanan optimal!

๐Ÿ’ก Cara Penggunaan

Gaya CI3 Tradisional

Gaya Modern PSR-4

๐Ÿ” Keamanan

Format Data Baru (OpenSSL)

Deteksi Tampering

๐Ÿ”„ Migrasi dari Legacy (mcrypt)

Library ini otomatis mendeteksi dan membaca data legacy CI3:

Script Migrasi Database

๐Ÿ“š API Reference

Method Deskripsi Return
encode($string, $key = '') Enkripsi string string (base64)
decode($string, $key = '') Dekripsi string string|false
set_cipher($cipher) Set algoritma cipher self
set_mode($mode) Set mode operasi self
sha1($str) Generate SHA1 hash string
set_key($key) Set encryption key self
is_legacy_format($string) Cek format legacy bool
migrate($old_encoded) Migrasi ke format baru string|false
encode_many($strings, $key) Batch enkripsi array
decode_many($encoded, $key) Batch dekripsi array

๐Ÿงช Testing

๐Ÿ“Š Perbandingan dengan CI3 Asli

Fitur CI3 Encrypt (mcrypt) Kodhe Encrypt (OpenSSL)
Engine Mcrypt โŒ (removed PHP 7.2+) OpenSSL โœ…
Integritas โŒ Tidak ada โœ… HMAC-SHA256
Tamper Proof โŒ Silent corruption โœ… Detect & reject
IV Generation Weak random โœ… random_bytes()
Key Derivation Simple substr โœ… HKDF/PBKDF2
Legacy Support N/A โœ… Auto-detect
Batch Ops โŒ โœ… encode_many()

โš ๏ธ Security Best Practices

  1. Gunakan Key Panjang: Minimal 32 karakter
  2. Simpan Key Aman: Jangan commit ke Git, gunakan environment variables
  3. Rotate Key Berkala: Ganti encryption key secara periodik
  4. HTTPS Always: Kirim data terenkripsi hanya via HTTPS
  5. Migrasi Data Lama: Segera migrate data legacy ke format baru

๐Ÿ“ Changelog

v2.0.0 (2024)

v1.0.0 (Legacy)

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿค Contributing

Contributions welcome! Please read our contributing guidelines before submitting PRs.

๐Ÿ“ž Support


Note: Library ini untuk CodeIgniter 3. Untuk CodeIgniter 4, gunakan built-in Encryption service.


All versions of encrypt with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0
ext-openssl Version *
ext-hash Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kodhe/encrypt contains the following files

Loading the files please wait ...