src/vectorUpload.php
/**
 * Encrypts a given string using AES encryption
 *
 * @param $plaintext string the string to encrypt
 * @return string the resulting encrypted string
 */
Encrypts a given string using AES encryption
@param $plaintext string the string to encrypt
@return string the resulting encrypted string
Encrypts a given string using AES encryption @param $plaintext string the string to encrypt @return string the resulting encrypted string
function encryptAES($plaintext) {
    $cipher = new Crypt_AES(CRYPT_MODE_ECB);
    $aesKeyFileName = "./.data/.aes_key.txt";
    $key = file_get_contents($aesKeyFileName);
    $cipher->setKey($key);
    $cipher->disablePadding();
    return base64_encode($cipher->encrypt($plaintext));
}
function encryptAES ( $ plaintext ) { $ cipher = new Crypt_AES ( CRYPT_MODE_ECB ) ; $ aesKeyFileName = " ./.data/.aes_key.txt " ; $ key = file_get_contents ( $ aesKeyFileName ) ; $ cipher -> setKey ( $ key ) ; $ cipher -> disablePadding ( ) ; return base64_encode ( $ cipher -> encrypt ( $ plaintext ) ) ; }
Encrypts a given string using AES encryption
 @param $plaintext string the string to encrypt
 @return string the resulting encrypted string
Encrypts a given string using AES encryption @param $plaintext string the string to encrypt @return string the resulting encrypted string