AES Decrypt

AES/CBC/PKCS5Padding encryption

    private function decrypt($str){
        //return $this->fake_response();
        $key = '927e88094c83c6b66487da5def1';
        //$key = hash('sha256', $key);
        //logg($key);
        $key =pack('H*', hash('sha256', $key));
        $iv = array_fill(0,16,chr(0));

        $iv1=implode('',$iv);

        $output = openssl_decrypt(
            base64_decode($str), 
            "AES-256-CBC", 
            $key, 
            OPENSSL_RAW_DATA, 
            $iv1
        );

        return $output;
    }
  1. MD5 Digest the password(REST_API_KEY) using SHA-256
  2. iv parameter is empty
  3. Decrypt the encrypted contents using AES/CBC/PKCS5Padding