source: src/router/php7/ext/openssl/tests/bug74099.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 2 months ago

update php

File size: 394 bytes
Line 
1--TEST--
2Bug #74099 Memory leak with openssl_encrypt()
3--SKIPIF--
4<?php
5if (!extension_loaded("openssl")) die("skip");
6?>
7--FILE--
8<?php
9$aad = random_bytes(32);
10$iv = random_bytes(16);
11$key = random_bytes(32);
12
13$plaintext = '';
14$tag = null;
15
16$ciphertext = openssl_encrypt($plaintext, 'aes-256-gcm', $key, \OPENSSL_RAW_DATA, $iv, $tag, $aad);
17var_dump($ciphertext);
18?>
19--EXPECTF--
20string(0) ""
Note: See TracBrowser for help on using the repository browser.