1. Go to this page and download the library: Download hemiframe/php-aes library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* Get encrypt/decrypt key
* @return string|null
*/
public function getKey(): string
/**
* Return encoded or decoded string
* @return mixed
*/
public function getData();
/**
* Get selected cipher method
* @return string
*/
public function getMethod(): string
/**
* Get available cipher methods
* @return array
*/
public function getAvailableMethods(bool $aliases = false): array
/**
* Gets selected iv string
* @return string
*/
public function getIv(): string
/**
* Generate a iv string for selected method
* @return string|bool
*/
public function generateIv();
/**
* Gets the cipher iv length
* @return int|bool
*/
public function getIvLength();
/**
* Set encrypt/decrypt key
* @param string $key
* @return $this
* @throws \InvalidArgumentException
*/
public function setKey(string $key): self
/**
* Set encrypt/decrypt method
* @param string $method
* @return $this
* @throws \InvalidArgumentException
*/
public function setMethod(string $method);
/**
* Set iv string
* @param string $iv
* @return $this
* @throws \InvalidArgumentException
*/
public function setIv(string $iv): self
/**
* Set encrypt/decrypt data
* @param mixed $data
* @return $this
* @throws \InvalidArgumentException
*/
public function setData($data): self
/**
* Returns the encrypted string on success or FALSE on failure.
* @return string|bool
* @throws \InvalidArgumentException
*/
public function encrypt();
/**
* The decrypted string on success or FALSE on failure.
* @return mixed
* @throws \InvalidArgumentException
*/
public function decrypt();
json
{
"emiframe/php-aes": "~1.2"
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.