randombit / botan

Compare 7f189df ... +8 ... 52fa621

Coverage Reach
lib/pubkey/ed25519/ed25519_fe.cpp lib/pubkey/ed25519/ge.cpp lib/pubkey/ed25519/sc_muladd.cpp lib/pubkey/ed25519/ed25519_key.cpp lib/pubkey/ed25519/sc_reduce.cpp lib/pubkey/ed25519/ed25519.cpp lib/pubkey/ec_group/point_gfp.cpp lib/pubkey/ec_group/ec_group.cpp lib/pubkey/ec_group/curve_gfp.cpp lib/pubkey/ec_group/point_mul.cpp lib/pubkey/ec_group/ec_named.cpp lib/pubkey/mce/polyn_gf2m.cpp lib/pubkey/mce/mceliece_key.cpp lib/pubkey/mce/gf2m_rootfind_dcmp.cpp lib/pubkey/mce/code_based_key_gen.cpp lib/pubkey/mce/goppa_code.cpp lib/pubkey/mce/mceliece.cpp lib/pubkey/mce/gf2m_small_m.cpp lib/pubkey/mce/mce_workfactor.cpp lib/pubkey/xmss/xmss_privatekey.cpp lib/pubkey/xmss/xmss_parameters.cpp lib/pubkey/xmss/xmss_wots_parameters.cpp lib/pubkey/xmss/xmss_verification_operation.cpp lib/pubkey/xmss/xmss_publickey.cpp lib/pubkey/xmss/xmss_signature_operation.cpp lib/pubkey/xmss/xmss_signature.cpp lib/pubkey/xmss/xmss_wots_privatekey.cpp lib/pubkey/xmss/xmss_hash.cpp lib/pubkey/xmss/xmss_index_registry.cpp lib/pubkey/xmss/xmss_common_ops.cpp lib/pubkey/xmss/xmss_wots_publickey.cpp lib/pubkey/dl_group/dl_group.cpp lib/pubkey/dl_group/dl_named.cpp lib/pubkey/curve25519/donna.cpp lib/pubkey/curve25519/curve25519.cpp lib/pubkey/rsa/rsa.cpp lib/pubkey/newhope/newhope.cpp lib/pubkey/sm2/sm2_enc.cpp lib/pubkey/sm2/sm2.cpp lib/pubkey/pbes2/pbes2.cpp lib/pubkey/pubkey.cpp lib/pubkey/ecies/ecies.cpp lib/pubkey/pk_algs.cpp lib/pubkey/pkcs8.cpp lib/pubkey/gost_3410/gost_3410.cpp lib/pubkey/ecdsa/ecdsa.cpp lib/pubkey/eckcdsa/eckcdsa.cpp lib/pubkey/dlies/dlies.cpp lib/pubkey/ecc_key/ecc_key.cpp lib/pubkey/dsa/dsa.cpp lib/pubkey/pk_ops.cpp lib/pubkey/elgamal/elgamal.cpp lib/pubkey/pem/pem.cpp lib/pubkey/dh/dh.cpp lib/pubkey/ecgdsa/ecgdsa.cpp lib/pubkey/pk_keys.cpp lib/pubkey/dl_algo/dl_algo.cpp lib/pubkey/x509_key.cpp lib/pubkey/blinding.cpp lib/pubkey/ecdh/ecdh.cpp lib/pubkey/keypair/keypair.cpp lib/pubkey/rfc6979/rfc6979.cpp lib/pubkey/workfactor.cpp lib/pubkey/cecpq1/cecpq1.cpp lib/math/mp/mp_monty_n.cpp lib/math/mp/mp_comba.cpp lib/math/mp/mp_karat.cpp lib/math/mp/mp_monty.cpp lib/math/numbertheory/nistp_redc.cpp lib/math/numbertheory/monty.cpp lib/math/numbertheory/numthry.cpp lib/math/numbertheory/mod_inv.cpp lib/math/numbertheory/make_prm.cpp lib/math/numbertheory/monty_exp.cpp lib/math/numbertheory/primality.cpp lib/math/numbertheory/dsa_gen.cpp lib/math/numbertheory/reducer.cpp lib/math/bigint/bigint.cpp lib/math/bigint/big_ops2.cpp lib/math/bigint/divide.cpp lib/math/bigint/big_ops3.cpp lib/math/bigint/big_code.cpp lib/math/bigint/big_io.cpp lib/math/bigint/big_rand.cpp lib/block/aes/aes.cpp lib/block/aes/aes_ni/aes_ni.cpp lib/block/aes/aes_vperm/aes_vperm.cpp lib/block/serpent/serpent.cpp lib/block/serpent/serpent_avx2/serpent_avx2.cpp lib/block/serpent/serpent_simd/serpent_simd.cpp lib/block/shacal2/shacal2.cpp lib/block/shacal2/shacal2_simd/shacal2_simd.cpp lib/block/shacal2/shacal2_avx2/shacal2_avx2.cpp lib/block/shacal2/shacal2_x86/shacal2_x86.cpp lib/block/des/des.cpp lib/block/threefish_512/threefish_512_avx2/threefish_512_avx2.cpp lib/block/threefish_512/threefish_512.cpp lib/block/aria/aria.cpp lib/block/idea/idea_sse2/idea_sse2.cpp lib/block/idea/idea.cpp lib/block/camellia/camellia.cpp lib/block/noekeon/noekeon.cpp lib/block/noekeon/noekeon_simd/noekeon_simd.cpp lib/block/cast128/cast128.cpp lib/block/twofish/twofish.cpp lib/block/blowfish/blowfish.cpp lib/block/sm4/sm4.cpp lib/block/seed/seed.cpp lib/block/gost_28147/gost_28147.cpp lib/block/block_cipher.cpp lib/block/lion/lion.cpp lib/block/cascade/cascade.cpp lib/tls/tls_server.cpp lib/tls/tls_channel.cpp lib/tls/tls_client.cpp lib/tls/tls_extensions.cpp lib/tls/tls_record.cpp lib/tls/tls_handshake_state.cpp lib/tls/tls_policy.cpp lib/tls/tls_cbc/tls_cbc.cpp lib/tls/tls_handshake_io.cpp lib/tls/tls_algos.cpp lib/tls/msg_client_hello.cpp lib/tls/msg_client_kex.cpp lib/tls/tls_session.cpp lib/tls/tls_text_policy.cpp lib/tls/msg_server_kex.cpp lib/tls/msg_server_hello.cpp lib/tls/sessions_sql/tls_session_manager_sql.cpp lib/tls/tls_alert.cpp lib/tls/tls_callbacks.cpp lib/tls/tls_ciphersuite.cpp lib/tls/msg_cert_req.cpp lib/tls/tls_session_manager_memory.cpp lib/tls/tls_session_key.cpp lib/tls/msg_certificate.cpp lib/tls/msg_cert_verify.cpp lib/tls/msg_cert_status.cpp lib/tls/msg_hello_verify.cpp lib/tls/tls_version.cpp lib/tls/msg_finished.cpp lib/tls/msg_session_ticket.cpp lib/tls/credentials_manager.cpp lib/tls/tls_handshake_hash.cpp lib/tls/sessions_sqlite3/tls_session_manager_sqlite.cpp lib/tls/tls_suite_info.cpp lib/x509/x509_ext.cpp lib/x509/x509path.cpp lib/x509/x509cert.cpp lib/x509/x509_dn.cpp lib/x509/x509_obj.cpp lib/x509/certstor_sql/certstor_sql.cpp lib/x509/ocsp.cpp lib/x509/x509_ca.cpp lib/x509/name_constraint.cpp lib/x509/pkcs10.cpp lib/x509/asn1_alt_name.cpp lib/x509/x509_crl.cpp lib/x509/cert_status.cpp lib/x509/certstor.cpp lib/x509/x509self.cpp lib/x509/certstor_flatfile/certstor_flatfile.cpp lib/x509/ocsp_types.cpp lib/x509/crl_ent.cpp lib/x509/key_constraint.cpp lib/x509/x509opt.cpp lib/x509/x509_attribute.cpp lib/x509/certstor_system/certstor_system.cpp lib/x509/x509_dn_ub.cpp lib/x509/certstor_sqlite3/certstor_sqlite.cpp lib/hash/sha1/sha1_sse2/sha1_sse2.cpp lib/hash/sha1/sha1_x86/sha1_x86.cpp lib/hash/sha1/sha160.cpp lib/hash/sha2_32/sha2_32.cpp lib/hash/sha2_32/sha2_32_x86/sha2_32_x86.cpp lib/hash/sha2_32/sha2_32_bmi2/sha2_32_bmi2.cpp lib/hash/sha2_64/sha2_64.cpp lib/hash/sha2_64/sha2_64_bmi2/sha2_64_bmi2.cpp lib/hash/sha3/sha3.cpp lib/hash/sha3/sha3_bmi2/sha3_bmi2.cpp lib/hash/sm3/sm3.cpp lib/hash/whirlpool/whirlpool.cpp lib/hash/gost_3411/gost_3411.cpp lib/hash/rmd160/rmd160.cpp lib/hash/blake2/blake2b.cpp lib/hash/checksum/adler32/adler32.cpp lib/hash/checksum/crc24/crc24.cpp lib/hash/checksum/crc32/crc32.cpp lib/hash/streebog/streebog.cpp lib/hash/skein/skein_512.cpp lib/hash/hash.cpp lib/hash/md4/md4.cpp lib/hash/md5/md5.cpp lib/hash/mdx_hash/mdx_hash.cpp lib/hash/comb4p/comb4p.cpp lib/hash/shake/shake.cpp lib/hash/par_hash/par_hash.cpp lib/hash/keccak/keccak.cpp lib/utils/ghash/ghash.cpp lib/utils/ghash/ghash_cpu/ghash_cpu.cpp lib/utils/ghash/ghash_vperm/ghash_vperm.cpp lib/utils/socket/uri.cpp lib/utils/socket/socket_udp.cpp lib/utils/socket/socket.cpp lib/utils/os_utils.cpp lib/utils/cpuid/cpuid.cpp lib/utils/cpuid/cpuid_x86.cpp lib/utils/exceptn.cpp lib/utils/http_util/http_util.cpp lib/utils/mem_pool/mem_pool.cpp lib/utils/parsing.cpp lib/utils/thread_utils/thread_pool.cpp lib/utils/thread_utils/rwlock.cpp lib/utils/thread_utils/barrier.cpp lib/utils/thread_utils/semaphore.cpp lib/utils/sqlite3/sqlite3.cpp lib/utils/data_src.cpp lib/utils/scan_name.cpp lib/utils/timer.cpp lib/utils/charset.cpp lib/utils/poly_dbl/poly_dbl.cpp lib/utils/calendar.cpp lib/utils/uuid/uuid.cpp lib/utils/read_kv.cpp lib/utils/filesystem.cpp lib/utils/read_cfg.cpp lib/utils/locking_allocator/locking_allocator.cpp lib/utils/ct_utils.cpp lib/utils/dyn_load/dyn_load.cpp lib/utils/version.cpp lib/utils/mem_ops.cpp lib/utils/assert.cpp lib/prov/pkcs11/p11.cpp lib/prov/pkcs11/p11_rsa.cpp lib/prov/pkcs11/p11_object.cpp lib/prov/pkcs11/p11_mechanism.cpp lib/prov/pkcs11/p11_ecdsa.cpp lib/prov/pkcs11/p11_ecc_key.cpp lib/prov/pkcs11/p11_ecdh.cpp lib/prov/pkcs11/p11_session.cpp lib/prov/pkcs11/p11_slot.cpp lib/prov/pkcs11/p11_module.cpp lib/prov/pkcs11/p11_x509.cpp lib/prov/pkcs11/p11_randomgenerator.cpp lib/prov/openssl/openssl_ec.cpp lib/prov/openssl/openssl_rsa.cpp lib/prov/openssl/openssl_block.cpp lib/prov/openssl/openssl_mode.cpp lib/prov/openssl/openssl_hash.cpp lib/prov/openssl/openssl_rc4.cpp lib/prov/tpm/tpm.cpp lib/modes/aead/ocb/ocb.cpp lib/modes/aead/ccm/ccm.cpp lib/modes/aead/siv/siv.cpp lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp lib/modes/aead/gcm/gcm.cpp lib/modes/aead/eax/eax.cpp lib/modes/aead/aead.cpp lib/modes/cbc/cbc.cpp lib/modes/mode_pad/mode_pad.cpp lib/modes/xts/xts.cpp lib/modes/cfb/cfb.cpp lib/modes/cipher_mode.cpp lib/asn1/ber_dec.cpp lib/asn1/oid_maps.cpp lib/asn1/der_enc.cpp lib/asn1/asn1_time.cpp lib/asn1/asn1_print.cpp lib/asn1/asn1_obj.cpp lib/asn1/asn1_oid.cpp lib/asn1/oids.cpp lib/asn1/asn1_str.cpp lib/asn1/alg_id.cpp lib/ffi/ffi_pkey_algs.cpp lib/ffi/ffi_cert.cpp lib/ffi/ffi.cpp lib/ffi/ffi_cipher.cpp lib/ffi/ffi_mp.cpp lib/ffi/ffi_pk_op.cpp lib/ffi/ffi_pkey.cpp lib/ffi/ffi_rng.cpp lib/ffi/ffi_kdf.cpp lib/ffi/ffi_hash.cpp lib/ffi/ffi_block.cpp lib/ffi/ffi_fpe.cpp lib/ffi/ffi_mac.cpp lib/ffi/ffi_hotp.cpp lib/ffi/ffi_totp.cpp lib/ffi/ffi_keywrap.cpp lib/stream/chacha/chacha.cpp lib/stream/chacha/chacha_simd32/chacha_simd32.cpp lib/stream/chacha/chacha_avx2/chacha_avx2.cpp lib/stream/salsa20/salsa20.cpp lib/stream/ctr/ctr.cpp lib/stream/rc4/rc4.cpp lib/stream/ofb/ofb.cpp lib/stream/shake_cipher/shake_cipher.cpp lib/stream/stream_cipher.cpp lib/filters/pipe.cpp lib/filters/secqueue.cpp lib/filters/b64_filt.cpp lib/filters/hex_filt.cpp lib/filters/pipe_rw.cpp lib/filters/comp_filter.cpp lib/filters/threaded_fork.cpp lib/filters/filter.cpp lib/filters/cipher_filter.cpp lib/filters/algo_filt.cpp lib/filters/buf_filt.cpp lib/filters/out_buf.cpp lib/filters/data_snk.cpp lib/filters/fd_unix/fd_unix.cpp lib/filters/basefilt.cpp lib/filters/pipe_io.cpp lib/misc/roughtime/roughtime.cpp lib/misc/tss/tss.cpp lib/misc/fpe_fe1/fpe_fe1.cpp lib/misc/nist_keywrap/nist_keywrap.cpp lib/misc/srp6/srp6.cpp lib/misc/cryptobox/cryptobox.cpp lib/misc/hotp/hotp.cpp lib/misc/hotp/totp.cpp lib/misc/rfc3394/rfc3394.cpp lib/pk_pad/iso9796/iso9796.cpp lib/pk_pad/emsa_pssr/pssr.cpp lib/pk_pad/emsa.cpp lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp lib/pk_pad/eme_oaep/oaep.cpp lib/pk_pad/emsa1/emsa1.cpp lib/pk_pad/hash_id/hash_id.cpp lib/pk_pad/emsa_x931/emsa_x931.cpp lib/pk_pad/eme_pkcs1/eme_pkcs.cpp lib/pk_pad/emsa_raw/emsa_raw.cpp lib/pk_pad/eme.cpp lib/pk_pad/mgf1/mgf1.cpp lib/pk_pad/eme_raw/eme_raw.cpp lib/pk_pad/padding.cpp lib/pbkdf/argon2/argon2.cpp lib/pbkdf/argon2/argon2pwhash.cpp lib/pbkdf/scrypt/scrypt.cpp lib/pbkdf/pbkdf2/pbkdf2.cpp lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.cpp lib/pbkdf/pgp_s2k/pgp_s2k.cpp lib/pbkdf/pgp_s2k/rfc4880.cpp lib/pbkdf/pbkdf.cpp lib/pbkdf/pwdhash.cpp lib/mac/poly1305/poly1305.cpp lib/mac/siphash/siphash.cpp lib/mac/gmac/gmac.cpp lib/mac/cmac/cmac.cpp lib/mac/hmac/hmac.cpp lib/mac/x919_mac/x919_mac.cpp lib/mac/mac.cpp lib/mac/blake2mac/blake2bmac.cpp lib/compat/sodium/sodium_aead.cpp lib/compat/sodium/sodium_utils.cpp lib/compat/sodium/sodium_salsa.cpp lib/compat/sodium/sodium_auth.cpp lib/compat/sodium/sodium_secretbox.cpp lib/compat/sodium/sodium_chacha.cpp lib/compat/sodium/sodium_box.cpp lib/compat/sodium/sodium_25519.cpp lib/codec/base64/base64.cpp lib/codec/base58/base58.cpp lib/codec/base32/base32.cpp lib/codec/hex/hex.cpp lib/kdf/sp800_108/sp800_108.cpp lib/kdf/kdf.cpp lib/kdf/hkdf/hkdf.cpp lib/kdf/prf_x942/prf_x942.cpp lib/kdf/sp800_56a/sp800_56a.cpp lib/kdf/prf_tls/prf_tls.cpp lib/kdf/kdf2/kdf2.cpp lib/kdf/kdf1_iso18033/kdf1_iso18033.cpp lib/kdf/kdf1/kdf1.cpp lib/kdf/sp800_56c/sp800_56c.cpp lib/rng/hmac_drbg/hmac_drbg.cpp lib/rng/stateful_rng/stateful_rng.cpp lib/rng/system_rng/system_rng.cpp lib/rng/chacha_rng/chacha_rng.cpp lib/rng/auto_rng/auto_rng.cpp lib/rng/processor_rng/processor_rng.cpp lib/rng/rng.cpp lib/compression/compress_utils.cpp lib/compression/zlib/zlib.cpp lib/compression/bzip2/bzip2.cpp lib/compression/lzma/lzma.cpp lib/compression/compression.cpp lib/passhash/bcrypt/bcrypt.cpp lib/passhash/passhash9/passhash9.cpp lib/passhash/argon2fmt/argon2fmt.cpp lib/base/symkey.cpp lib/base/buf_comp.cpp lib/base/sym_algo.cpp lib/psk_db/psk_db.cpp lib/psk_db/psk_db_sql.cpp lib/entropy/entropy_srcs.cpp lib/entropy/rdseed/rdseed.cpp tests/test_pkcs11_high_level.cpp tests/unit_x509.cpp tests/tests.cpp tests/unit_tls.cpp tests/unit_asio_stream.cpp tests/test_filters.cpp tests/test_x509_path.cpp tests/test_pkcs11_low_level.cpp tests/test_sodium.cpp tests/test_pubkey.cpp tests/test_ec_group.cpp tests/test_tls_stream_integration.cpp tests/test_rng.cpp tests/test_utils.cpp tests/test_bigint.cpp tests/test_modes.cpp tests/unit_ecdsa.cpp tests/test_ecies.cpp tests/test_certstor.cpp tests/test_tls.cpp tests/test_ocsp.cpp tests/test_asn1.cpp tests/test_runner.cpp tests/test_certstor_system.cpp tests/test_certstor_flatfile.cpp tests/test_ocb.cpp tests/test_pbkdf.cpp tests/tests.h tests/test_roughtime.cpp tests/test_hash.cpp tests/test_tests.cpp tests/test_rsa.cpp tests/test_psk_db.cpp tests/test_tls_messages.cpp tests/test_simd.cpp tests/test_ecdsa.cpp tests/test_dlies.cpp tests/test_block.cpp tests/test_rng.h tests/test_stream.cpp tests/test_passhash.cpp tests/test_octetstring.cpp tests/test_dl_group.cpp tests/test_compression.cpp tests/test_mac.cpp tests/test_keywrap.cpp tests/test_tss.cpp tests/test_dh.cpp tests/test_newhope.cpp tests/test_pk_pad.cpp tests/test_otp.cpp tests/test_c25519.cpp tests/test_mceliece.cpp tests/test_srp6.cpp tests/test_uri.cpp tests/test_entropy.cpp tests/test_gost_3410.cpp tests/main.cpp tests/test_ffi.cpp tests/test_ed25519.cpp tests/test_oid.cpp tests/test_tpm.cpp tests/test_pubkey.h tests/test_hash_id.cpp tests/test_rng_kat.cpp tests/test_ecc_pointmul.cpp tests/test_aead.cpp tests/test_sm2.cpp tests/test_xmss.cpp tests/test_kdf.cpp tests/test_dsa.cpp tests/test_name_constraint.cpp tests/test_pad.cpp tests/test_x509_dn.cpp tests/test_cryptobox.cpp tests/test_siv.cpp tests/test_thread_utils.cpp tests/test_certstor_utils.cpp tests/test_elgamal.cpp tests/test_eckcdsa.cpp tests/test_ecgdsa.cpp tests/test_pem.cpp tests/test_ecdh.cpp tests/test_rfc6979.cpp tests/test_clang_bug.cpp tests/test_fpe.cpp tests/test_os_utils.cpp tests/test_workfactor.cpp tests/test_blowfish.cpp tests/test_pkcs11.h tests/test_mp.cpp tests/unit_tls_policy.cpp tests/test_gf2m.cpp tests/unit_ecdh.cpp tests/test_runner.h cli/speed.cpp cli/pubkey.cpp cli/tls_http_server.cpp cli/timing_tests.cpp cli/tls_proxy.cpp cli/x509.cpp cli/tls_client.cpp cli/utils.cpp cli/cli.cpp cli/tls_server.cpp cli/pk_crypt.cpp cli/math.cpp cli/argparse.h cli/codec.cpp cli/tls_utils.cpp cli/roughtime.cpp cli/compress.cpp cli/cc_enc.cpp cli/tls_helpers.h cli/tss.cpp cli/cli_rng.cpp cli/entropy.cpp cli/pbkdf.cpp cli/psk.cpp cli/cipher.cpp cli/bcrypt.cpp cli/asn1.cpp cli/hmac.cpp cli/hash.cpp cli/argon2.cpp cli/main.cpp cli/sandbox.cpp cli/cli.h cli/cli_exceptions.h cli/socket_utils.h python/botan2.py fuzzer/mem_pool.cpp fuzzer/mode_padding.cpp fuzzer/tls_server.cpp fuzzer/ecc_helper.h fuzzer/tls_client.cpp fuzzer/bn_cmp.cpp fuzzer/invert.cpp fuzzer/oaep.cpp fuzzer/fuzzers.h fuzzer/pkcs1.cpp fuzzer/pow_mod.cpp fuzzer/divide.cpp fuzzer/os2ecp.cpp fuzzer/barrett.cpp fuzzer/gcd.cpp fuzzer/x509_dn.cpp fuzzer/ressol.cpp fuzzer/asn1.cpp fuzzer/redc_p384.cpp fuzzer/redc_p256.cpp fuzzer/redc_p521.cpp fuzzer/redc_p224.cpp fuzzer/redc_p192.cpp fuzzer/bn_sqr.cpp fuzzer/pkcs8.cpp fuzzer/tls_client_hello.cpp fuzzer/crl.cpp fuzzer/cert.cpp fuzzer/ocsp.cpp fuzzer/uri.cpp fuzzer/ecc_bp256.cpp fuzzer/ecc_p256.cpp fuzzer/ecc_p384.cpp fuzzer/ecc_p521.cpp bogo_shim/bogo_shim.cpp scripts/test_python.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 15 of 30 files from the diff.

@@ -11,8 +11,8 @@
Loading
11 11
12 12
namespace Botan {
13 13
14 -
XTS_Mode::XTS_Mode(BlockCipher* cipher) :
15 -
   m_cipher(cipher),
14 +
XTS_Mode::XTS_Mode(std::unique_ptr<BlockCipher> cipher) :
15 +
   m_cipher(std::move(cipher)),
16 16
   m_cipher_block_size(m_cipher->block_size()),
17 17
   m_cipher_parallelism(m_cipher->parallel_bytes())
18 18
   {
@@ -21,7 +21,7 @@
Loading
21 21
      throw Invalid_Argument("Cannot use " + cipher->name() + " with XTS");
22 22
      }
23 23
24 -
   m_tweak_cipher.reset(m_cipher->clone());
24 +
   m_tweak_cipher = m_cipher->new_object();
25 25
   }
26 26
27 27
void XTS_Mode::clear()

@@ -35,9 +35,9 @@
Loading
35 35
/*
36 36
* EAX_Mode Constructor
37 37
*/
38 -
EAX_Mode::EAX_Mode(BlockCipher* cipher, size_t tag_size) :
38 +
EAX_Mode::EAX_Mode(std::unique_ptr<BlockCipher> cipher, size_t tag_size) :
39 39
   m_tag_size(tag_size),
40 -
   m_cipher(cipher),
40 +
   m_cipher(std::move(cipher)),
41 41
   m_ctr(new CTR_BE(m_cipher->new_object())),
42 42
   m_cmac(new CMAC(m_cipher->new_object()))
43 43
   {

@@ -211,11 +211,11 @@
Loading
211 211
212 212
}
213 213
214 -
Cipher_Mode*
214 +
std::unique_ptr<Cipher_Mode>
215 215
make_openssl_cipher_mode(const std::string& name, Cipher_Dir direction)
216 216
   {
217 217
#define MAKE_OPENSSL_MODE(evp_fn) \
218 -
   new OpenSSL_Cipher_Mode(name, (evp_fn)(), direction)
218 +
   std::make_unique<OpenSSL_Cipher_Mode>(name, (evp_fn)(), direction)
219 219
220 220
#if defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_MODE_CBC) && !defined(OPENSSL_NO_AES)
221 221
   if(name == "AES-128/CBC/NoPadding")

@@ -16,15 +16,16 @@
Loading
16 16
/*
17 17
* GCM_Mode Constructor
18 18
*/
19 -
GCM_Mode::GCM_Mode(BlockCipher* cipher, size_t tag_size) :
19 +
GCM_Mode::GCM_Mode(std::unique_ptr<BlockCipher> cipher, size_t tag_size) :
20 20
   m_tag_size(tag_size),
21 -
   m_cipher_name(cipher->name()),
22 -
   m_ctr(new CTR_BE(std::unique_ptr<BlockCipher>(cipher), 4)),
23 -
   m_ghash(new GHASH)
21 +
   m_cipher_name(cipher->name())
24 22
   {
25 23
   if(cipher->block_size() != GCM_BS)
26 24
      throw Invalid_Argument("Invalid block cipher for GCM");
27 25
26 +
   m_ctr = std::make_unique<CTR_BE>(std::move(cipher), 4);
27 +
   m_ghash = std::make_unique<GHASH>();
28 +
28 29
   /* We allow any of the values 128, 120, 112, 104, or 96 bits as a tag size */
29 30
   /* 64 bit tag is still supported but deprecated and will be removed in the future */
30 31
   if(m_tag_size != 8 && (m_tag_size < 12 || m_tag_size > 16))

@@ -174,9 +174,9 @@
Loading
174 174
   return "PBKDF2(" + m_mac->name() + ")";
175 175
   }
176 176
177 -
PBKDF* PKCS5_PBKDF2::clone() const
177 +
std::unique_ptr<PBKDF> PKCS5_PBKDF2::new_object() const
178 178
   {
179 -
   return new PKCS5_PBKDF2(m_mac->clone());
179 +
   return std::make_unique<PKCS5_PBKDF2>(m_mac->clone());
180 180
   }
181 181
182 182
// PasswordHash interface

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 5 files with coverage changes found.

Changes in src/lib/utils/thread_utils/semaphore.cpp
-4
+4
Loading file...
Changes in src/lib/tls/tls_cbc/tls_cbc.cpp
-1
Loading file...
Changes in src/lib/prov/openssl/openssl_mode.cpp
+1
Loading file...
Changes in src/lib/pubkey/mce/mceliece_key.cpp
-2
+2
Loading file...
Changes in src/lib/asn1/der_enc.cpp
-4
+4
Loading file...
Files Coverage
src +<.01% 92.39%
Project Totals (565 files) 92.39%
Loading