REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 1.34 KB
Close
/home/certprox/template.certproxywizard.com/wp-content/plugins/hostinger-reach/src/Setup/Encrypt.php
Text
Base64
<?php namespace Hostinger\Reach\Setup; class Encrypt { public const ENCRYPT_METHOD = 'AES-256-CBC'; public static function encrypt( string $value ): string { if ( ! self::can_encrypt() ) { return base64_encode( $value ); } $key = hash( 'sha256', AUTH_KEY, true ); $iv = openssl_random_pseudo_bytes( openssl_cipher_iv_length( self::ENCRYPT_METHOD ) ); $encrypted = openssl_encrypt( $value, self::ENCRYPT_METHOD, $key, 0, $iv ); return base64_encode( $iv . $encrypted ); } public static function decrypt( string $value ): string { if ( ! self::can_encrypt() ) { return base64_decode( $value ); } $iv_length = openssl_cipher_iv_length( self::ENCRYPT_METHOD ); $data = base64_decode( $value ); $iv = substr( $data, 0, $iv_length ); $encrypted = substr( $data, $iv_length ); $key = hash( 'sha256', AUTH_KEY, true ); return openssl_decrypt( $encrypted, self::ENCRYPT_METHOD, $key, 0, $iv ); } private static function get_auth_key(): string { if ( ! DEFINED( 'AUTH_KEY' ) ) { return ''; } return AUTH_KEY; } private static function can_encrypt(): bool { return extension_loaded( 'openssl' ) && self::get_auth_key(); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Activator.php
1.20 KB
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Assets.php
26.55 KB
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Blocks.php
882 B
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Database.php
856 B
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Encrypt.php
1.34 KB
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).