function encrypt($plaintext ) { // hash the key to a fixed length $hashed_key = hash('sha256', 'kDLTzj2QGCenCXW8s44h4ddDjeJiuSP2', true); // pad the plaintext with whitespace to be a multiple of 16 bytes $padded_plaintext = str_pad($plaintext, strlen($plaintext) + 16 - strlen($plaintext) % 16); // encrypt the padded plaintext with the hashed key $iv = openssl_random_pseudo_bytes(16); $ciphertext = openssl_encrypt($padded_plaintext, 'AES-256-CBC', $hashed_key, OPENSSL_RAW_DATA, $iv); $ciphertext = base64_encode($iv . $ciphertext); return $ciphertext; } function decrypt($ciphertext) { // hash the key to a fixed length $hashed_key = hash('sha256', 'kDLTzj2QGCenCXW8s44h4ddDjeJiuSP2', true); // decrypt the ciphertext with the hashed key $ciphertext = base64_decode($ciphertext); $iv = substr($ciphertext, 0, 16); $ciphertext = substr($ciphertext, 16); $padded_plaintext = openssl_decrypt($ciphertext, 'AES-256-CBC', $hashed_key, OPENSSL_RAW_DATA, $iv); $plaintext = rtrim($padded_plaintext, "\0"); return $plaintext; } ?>
The results has been filter on Authors containing Robin T. J. Tuck.
ANA has found 7 results for you, in
3307 ms.
Currently showing results 1 to 7.
Didn’t find what you were looking for? Try the Advanced Search!
Tuck and Harvey (1980a, January 01). Do promotions undermine the brand?. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/do-promotions-undermine-the-brand--1895
Tuck, R. T. (1971a, June 15). Report back. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/report-back
Tuck, R. T. (1971a, June 15). Report-back from working group IV. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/report-back-from-working-group-iv
Tuck, R. T. (1972a, September 01). Are international advertising campaigns possible?. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/are-international-advertising-campaigns-possible-
Tuck and Firth (1973a, November 28). Can research join in the creative process?. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/can-research-join-in-the-creative-process-
Tuck, R. T. (1976a, April 01). International marketing research . ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/international-marketing-research-
Tuck and Harvey (1971a, June 15). Do promotions undermine the brand?. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/do-promotions-undermine-the-brand-