@@ -2551,8 +2551,7 @@ auto test_vectors_aes_mmt(const nist::cavs::test_vector_container_aes& test_vect
25512551 }
25522552}
25532553
2554- /*
2555- template <boost::crypt::aes::cipher_mode mode, typename AESType>
2554+ template <boost::crypt::aes_cipher_mode mode, typename AESType>
25562555auto test_vectors_aes_mct (const nist::cavs::test_vector_container_aes& test_vectors) -> bool
25572556{
25582557 BOOST_TEST (!test_vectors.empty ());
@@ -2568,6 +2567,7 @@ auto test_vectors_aes_mct(const nist::cavs::test_vector_container_aes& test_vect
25682567 auto iv {test_vector.iv };
25692568 auto key {test_vector.key };
25702569
2570+ /*
25712571 BOOST_CRYPT_IF_CONSTEXPR (mode == boost::crypt::aes::cipher_mode::cfb8 || mode == boost::crypt::aes::cipher_mode::cfb128)
25722572 {
25732573 if (plaintext.empty() || ciphertext.empty() || iv.empty() || key.empty())
@@ -2581,19 +2581,20 @@ auto test_vectors_aes_mct(const nist::cavs::test_vector_container_aes& test_vect
25812581 iv.pop_back();
25822582 key.pop_back();
25832583 }
2584+ */
25842585
25852586 AESType aes;
25862587
2587- aes.init(key.begin(), key.size() );
2588+ aes.init (key);
25882589
25892590 if (count < total_tests / 2U )
25902591 {
25912592 // Encrypt Path
2592- BOOST_CRYPT_IF_CONSTEXPR (mode == boost::crypt::aes::cipher_mode ::ecb)
2593+ if constexpr (mode == boost::crypt::aes_cipher_mode ::ecb)
25932594 {
25942595 for (int i {0 }; i < 1000 ; ++i)
25952596 {
2596- aes.template encrypt<mode> (plaintext.begin(), plaintext.size() );
2597+ aes.encrypt_no_padding (plaintext);
25972598 }
25982599 }
25992600 else
@@ -2606,13 +2607,13 @@ auto test_vectors_aes_mct(const nist::cavs::test_vector_container_aes& test_vect
26062607 {
26072608 if (i == 0 )
26082609 {
2609- aes.template encrypt<mode> (PT[0].begin(), PT[0].size(), iv.begin(), iv.size() );
2610+ aes.encrypt_no_padding (PT[0 ], iv );
26102611 CT[0 ] = PT[0 ];
26112612 PT[1 ] = iv;
26122613 }
26132614 else
26142615 {
2615- aes.template encrypt<mode> (PT[i].begin(), PT[i].size() );
2616+ aes.encrypt_no_padding (PT[i]);
26162617 CT[i] = PT[i];
26172618 if (i < 999 )
26182619 {
@@ -2628,11 +2629,11 @@ auto test_vectors_aes_mct(const nist::cavs::test_vector_container_aes& test_vect
26282629 else
26292630 {
26302631 // Decrypt Path
2631- BOOST_CRYPT_IF_CONSTEXPR (mode == boost::crypt::aes::cipher_mode ::ecb)
2632+ if constexpr (mode == boost::crypt::aes_cipher_mode ::ecb)
26322633 {
26332634 for (int i {0 }; i < 1000 ; ++i)
26342635 {
2635- aes.template decrypt<mode> (ciphertext.begin(), ciphertext.size() );
2636+ aes.decrypt_no_padding (ciphertext);
26362637 }
26372638 }
26382639 else
@@ -2645,13 +2646,13 @@ auto test_vectors_aes_mct(const nist::cavs::test_vector_container_aes& test_vect
26452646 {
26462647 if (i == 0 )
26472648 {
2648- aes.template decrypt<mode> (PT[0].begin(), PT[0].size(), iv.begin(), iv.size() );
2649+ aes.decrypt_no_padding (PT[0 ], iv );
26492650 CT[0 ] = PT[0 ];
26502651 PT[1 ] = iv;
26512652 }
26522653 else
26532654 {
2654- aes.template decrypt<mode> (PT[i].begin(), PT[i].size() );
2655+ aes.decrypt_no_padding (PT[i]);
26552656 CT[i] = PT[i];
26562657 if (i < 999 )
26572658 {
@@ -2678,7 +2679,6 @@ auto test_vectors_aes_mct(const nist::cavs::test_vector_container_aes& test_vect
26782679
26792680 return result_is_ok;
26802681}
2681- */
26822682
26832683#ifdef _MSC_VER
26842684# pragma warning( pop )
0 commit comments