diff options
author | m-holger <m-holger@kubitscheck.org> | 2023-05-20 14:24:10 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2023-05-20 16:41:40 +0200 |
commit | 41ec7eda54e2263eeb1aee4c3a0616c9c2777fb7 (patch) | |
tree | cb151a0c0d9eaf79f3f075879751cc89f98d6f4e /libtests/aes.cc | |
parent | d0682f0f609e979ba085d93a1a0d8e0559f739bb (diff) | |
download | qpdf-41ec7eda54e2263eeb1aee4c3a0616c9c2777fb7.tar.zst |
Use auto when initialializing with new
Diffstat (limited to 'libtests/aes.cc')
-rw-r--r-- | libtests/aes.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libtests/aes.cc b/libtests/aes.cc index 5ae8152a..a981fc22 100644 --- a/libtests/aes.cc +++ b/libtests/aes.cc @@ -74,7 +74,7 @@ main(int argc, char* argv[]) FILE* infile = QUtil::safe_fopen(infilename, "rb"); FILE* outfile = QUtil::safe_fopen(outfilename, "wb"); - unsigned char* key = new unsigned char[keylen]; + auto* key = new unsigned char[keylen]; for (unsigned int i = 0; i < strlen(hexkey); i += 2) { char t[3]; t[0] = hexkey[i]; @@ -85,8 +85,8 @@ main(int argc, char* argv[]) key[i / 2] = static_cast<unsigned char>(val); } - Pl_StdioFile* out = new Pl_StdioFile("stdout", outfile); - Pl_AES_PDF* aes = new Pl_AES_PDF("aes_128_cbc", out, encrypt, key, keylen); + auto* out = new Pl_StdioFile("stdout", outfile); + auto* aes = new Pl_AES_PDF("aes_128_cbc", out, encrypt, key, keylen); delete[] key; key = nullptr; if (!cbc_mode) { |