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; } ?>
ANA has found 8442 results for you, in
10697 ms.
Currently showing results 1 to 9.
Didn’t find what you were looking for? Try the Advanced Search!
Biel, A. L. (1972a, September 01). Market segmentation. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/market-segmentation-1016
Bratina and Zanetti (1972a, September 01). Innovative marketing between industrial civilization and culture. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/innovative-marketing-between-industrial-civilization-and-culture
Wind, Le Maire and Douglas (1972a, September 01). Selection of global target markets. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/selection-of-global-target-markets
de Vos et al. (1960a, June 15). Group discussion on "Distribution research" and "Motivation research on the channels of distribution" . ANA - ESOMAR. Retrieved March 31, 2023, from
Stolte, J. (1972a, September 01). Survey on the problems of transferring a brand from one Western European country to another. ANA - ESOMAR. Retrieved March 31, 2023, from
Hayes, P. J. (1973a, January 01). Flexibility . ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/flexibility-
Gordon, L. I. (1973a, January 01). The use of telephone interviewing in industrial research. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/the-use-of-telephone-interviewing-in-industrial-research
Agarwal, M. (2019a, September 08). Measuring potential virality of content. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/measuring-potential-virality-of-content
Torales, Ferraz and Nomm (2019a, September 08). Dear {Diary_Name}:. ANA - ESOMAR. Retrieved March 31, 2023, from
https://ana.esomar.org/documents/dear-diary-name-