Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypting additional parameters should using AES-256-CBC #4

Open
epubreader opened this issue Jan 27, 2021 · 0 comments
Open

Encrypting additional parameters should using AES-256-CBC #4

epubreader opened this issue Jan 27, 2021 · 0 comments

Comments

@epubreader
Copy link

// Encrypting additional parameters using AES-256-CBC (for >= PHP 7)
$iv = substr(hash('sha256', $key), 0, 16);
$m_params = urlencode(base64_encode(openssl_encrypt(json_encode($arParams),'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv)));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant