(Aes 256-CBF)i need Encrypt And Decrypt Same this code(PHP) in c++ [closed]

  aes, c++, encryption

i need use aes_decrypt and aes_encrypt in c++
AES256_Method = AES-256-CFB

in make iv same in php to can in c++ decrypt and encrypt aes 256

this in php

    static public function aes_encrypt($input)
    {
        $key = substr(hash('sha256', Config::AES256_Password, false), 0, 32);
        $iv_len = openssl_cipher_iv_length(Config::AES256_Method);
        $iv = openssl_random_pseudo_bytes($iv_len);

        $ciphertext = openssl_encrypt($input, Config::AES256_Method, $key, OPENSSL_RAW_DATA, $iv);
        $encrypted = base64_encode($iv . $ciphertext);

        return $encrypted;
    }
    ```

Source: Windows Questions C++

LEAVE A COMMENT