diff options
author | Thomas Markwalder <tmark@isc.org> | 2024-01-31 20:32:50 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2024-02-07 14:58:47 +0100 |
commit | 51d67d63a423221a62659c217355ccf20daf87ab (patch) | |
tree | 2a4d69d865d053edab37e2b2e626f35050c3200d /src/lib | |
parent | [#3209] Remove internal bool vectors (diff) | |
download | kea-51d67d63a423221a62659c217355ccf20daf87ab.tar.xz kea-51d67d63a423221a62659c217355ccf20daf87ab.zip |
[#3209] Updated copyrights
Diffstat (limited to 'src/lib')
38 files changed, 61 insertions, 36 deletions
diff --git a/src/lib/cryptolink/tests/crypto_unittests.cc b/src/lib/cryptolink/tests/crypto_unittests.cc index 54c5c9af63..dc575044d7 100644 --- a/src/lib/cryptolink/tests/crypto_unittests.cc +++ b/src/lib/cryptolink/tests/crypto_unittests.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/cryptolink/tests/hash_unittests.cc b/src/lib/cryptolink/tests/hash_unittests.cc index 0500c35107..cd747b4f4d 100644 --- a/src/lib/cryptolink/tests/hash_unittests.cc +++ b/src/lib/cryptolink/tests/hash_unittests.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/cryptolink/tests/hmac_unittests.cc b/src/lib/cryptolink/tests/hmac_unittests.cc index 0fabf92640..ab133e51d4 100644 --- a/src/lib/cryptolink/tests/hmac_unittests.cc +++ b/src/lib/cryptolink/tests/hmac_unittests.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2022 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/d2srv/testutils/nc_test_utils.cc b/src/lib/d2srv/testutils/nc_test_utils.cc index b0f47c18e4..6791eb9639 100644 --- a/src/lib/d2srv/testutils/nc_test_utils.cc +++ b/src/lib/d2srv/testutils/nc_test_utils.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp/option.cc b/src/lib/dhcp/option.cc index 8e9a03a505..eda9d58381 100644 --- a/src/lib/dhcp/option.cc +++ b/src/lib/dhcp/option.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp/option6_pdexclude.cc b/src/lib/dhcp/option6_pdexclude.cc index 4e785e5db7..bdee4471b7 100644 --- a/src/lib/dhcp/option6_pdexclude.cc +++ b/src/lib/dhcp/option6_pdexclude.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2016-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2016-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp/tests/duid_factory_unittest.cc b/src/lib/dhcp/tests/duid_factory_unittest.cc index 5a7a400c21..ed5020db28 100644 --- a/src/lib/dhcp/tests/duid_factory_unittest.cc +++ b/src/lib/dhcp/tests/duid_factory_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp/tests/option6_pdexclude_unittest.cc b/src/lib/dhcp/tests/option6_pdexclude_unittest.cc index c1da0e1066..6b3eebca9e 100644 --- a/src/lib/dhcp/tests/option6_pdexclude_unittest.cc +++ b/src/lib/dhcp/tests/option6_pdexclude_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2016-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2016-2024 Internet Systems Consortium, Inc. ("ISC") // // Author: Andrei Pavel <andrei.pavel@qualitance.com> // diff --git a/src/lib/dhcp/tests/option_vendor_unittest.cc b/src/lib/dhcp/tests/option_vendor_unittest.cc index 906cb6efd8..030a59a131 100644 --- a/src/lib/dhcp/tests/option_vendor_unittest.cc +++ b/src/lib/dhcp/tests/option_vendor_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2017 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp/testutils/pkt_captures4.cc b/src/lib/dhcp/testutils/pkt_captures4.cc index 81cc85509a..3ba9013085 100644 --- a/src/lib/dhcp/testutils/pkt_captures4.cc +++ b/src/lib/dhcp/testutils/pkt_captures4.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp/testutils/pkt_captures6.cc b/src/lib/dhcp/testutils/pkt_captures6.cc index 72e23886ec..f2bd8ece4e 100644 --- a/src/lib/dhcp/testutils/pkt_captures6.cc +++ b/src/lib/dhcp/testutils/pkt_captures6.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp_ddns/ncr_msg.cc b/src/lib/dhcp_ddns/ncr_msg.cc index 82c3ba9ae3..9b1e7bff44 100644 --- a/src/lib/dhcp_ddns/ncr_msg.cc +++ b/src/lib/dhcp_ddns/ncr_msg.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcpsrv/cfg_duid.cc b/src/lib/dhcpsrv/cfg_duid.cc index 6a440003dd..24be637ab7 100644 --- a/src/lib/dhcpsrv/cfg_duid.cc +++ b/src/lib/dhcpsrv/cfg_duid.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2020 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcpsrv/tests/cfg_duid_unittest.cc b/src/lib/dhcpsrv/tests/cfg_duid_unittest.cc index 939a9a84f0..933b2c8f77 100644 --- a/src/lib/dhcpsrv/tests/cfg_duid_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_duid_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2020 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcpsrv/tests/duid_config_parser_unittest.cc b/src/lib/dhcpsrv/tests/duid_config_parser_unittest.cc index 79de77e460..14a4723142 100644 --- a/src/lib/dhcpsrv/tests/duid_config_parser_unittest.cc +++ b/src/lib/dhcpsrv/tests/duid_config_parser_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcpsrv/tests/sanity_checks_unittest.cc b/src/lib/dhcpsrv/tests/sanity_checks_unittest.cc index df297ea5ce..bfe24bdee8 100644 --- a/src/lib/dhcpsrv/tests/sanity_checks_unittest.cc +++ b/src/lib/dhcpsrv/tests/sanity_checks_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2018-2022 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata.cc b/src/lib/dns/rdata.cc index 45e9a3ed1c..3edfa4b8c0 100644 --- a/src/lib/dns/rdata.cc +++ b/src/lib/dns/rdata.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/any_255/tsig_250.cc b/src/lib/dns/rdata/any_255/tsig_250.cc index 4b20fd643d..47b1107769 100644 --- a/src/lib/dns/rdata/any_255/tsig_250.cc +++ b/src/lib/dns/rdata/any_255/tsig_250.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/detail/nsec3param_common.cc b/src/lib/dns/rdata/generic/detail/nsec3param_common.cc index cc90558ff8..6dada443a9 100644 --- a/src/lib/dns/rdata/generic/detail/nsec3param_common.cc +++ b/src/lib/dns/rdata/generic/detail/nsec3param_common.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/dlv_32769.cc b/src/lib/dns/rdata/generic/dlv_32769.cc index 78424cc0db..6170209806 100644 --- a/src/lib/dns/rdata/generic/dlv_32769.cc +++ b/src/lib/dns/rdata/generic/dlv_32769.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/ds_43.cc b/src/lib/dns/rdata/generic/ds_43.cc index 5f193c508a..80a6a6c119 100644 --- a/src/lib/dns/rdata/generic/ds_43.cc +++ b/src/lib/dns/rdata/generic/ds_43.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/nsec3_50.cc b/src/lib/dns/rdata/generic/nsec3_50.cc index 2de3fd6e48..398757931c 100644 --- a/src/lib/dns/rdata/generic/nsec3_50.cc +++ b/src/lib/dns/rdata/generic/nsec3_50.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/nsec3param_51.cc b/src/lib/dns/rdata/generic/nsec3param_51.cc index 883291a222..74a7109f23 100644 --- a/src/lib/dns/rdata/generic/nsec3param_51.cc +++ b/src/lib/dns/rdata/generic/nsec3param_51.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/nsec_47.cc b/src/lib/dns/rdata/generic/nsec_47.cc index d3c7bac3ce..e78e18aa77 100644 --- a/src/lib/dns/rdata/generic/nsec_47.cc +++ b/src/lib/dns/rdata/generic/nsec_47.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/rrsig_46.cc b/src/lib/dns/rdata/generic/rrsig_46.cc index da5f1f63f7..c9f91a7b9f 100644 --- a/src/lib/dns/rdata/generic/rrsig_46.cc +++ b/src/lib/dns/rdata/generic/rrsig_46.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/sshfp_44.cc b/src/lib/dns/rdata/generic/sshfp_44.cc index 7ac36a3581..168e631643 100644 --- a/src/lib/dns/rdata/generic/sshfp_44.cc +++ b/src/lib/dns/rdata/generic/sshfp_44.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/tkey_249.cc b/src/lib/dns/rdata/generic/tkey_249.cc index cace535a48..7952065440 100644 --- a/src/lib/dns/rdata/generic/tkey_249.cc +++ b/src/lib/dns/rdata/generic/tkey_249.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2021 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2021-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/generic/tlsa_52.cc b/src/lib/dns/rdata/generic/tlsa_52.cc index 94183d4127..c05ef16518 100644 --- a/src/lib/dns/rdata/generic/tlsa_52.cc +++ b/src/lib/dns/rdata/generic/tlsa_52.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/rdata/in_1/dhcid_49.cc b/src/lib/dns/rdata/in_1/dhcid_49.cc index 4d36b278ef..fc5f51bd23 100644 --- a/src/lib/dns/rdata/in_1/dhcid_49.cc +++ b/src/lib/dns/rdata/in_1/dhcid_49.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/tests/nsec3hash_unittest.cc b/src/lib/dns/tests/nsec3hash_unittest.cc index b447fa443a..39c8271d5f 100644 --- a/src/lib/dns/tests/nsec3hash_unittest.cc +++ b/src/lib/dns/tests/nsec3hash_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/tests/rdata_dhcid_unittest.cc b/src/lib/dns/tests/rdata_dhcid_unittest.cc index e603ff45b5..c2cedee57c 100644 --- a/src/lib/dns/tests/rdata_dhcid_unittest.cc +++ b/src/lib/dns/tests/rdata_dhcid_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/tests/tsig_unittest.cc b/src/lib/dns/tests/tsig_unittest.cc index 2e58ca7c8c..9b40d80d94 100644 --- a/src/lib/dns/tests/tsig_unittest.cc +++ b/src/lib/dns/tests/tsig_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/tsigkey.cc b/src/lib/dns/tsigkey.cc index 9f1eaf31ab..a32d8c9246 100644 --- a/src/lib/dns/tsigkey.cc +++ b/src/lib/dns/tsigkey.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2021 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/eval/token.cc b/src/lib/eval/token.cc index 45b11db57f..4c99eca95e 100644 --- a/src/lib/eval/token.cc +++ b/src/lib/eval/token.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2023 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/http/basic_auth.cc b/src/lib/http/basic_auth.cc index 2f048c939a..b392193056 100644 --- a/src/lib/http/basic_auth.cc +++ b/src/lib/http/basic_auth.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2020-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/util/encode/encode.cc b/src/lib/util/encode/encode.cc index f671cb860b..ed63c11cc4 100644 --- a/src/lib/util/encode/encode.cc +++ b/src/lib/util/encode/encode.cc @@ -89,8 +89,13 @@ BaseNEncoder::encode(const std::vector<uint8_t>& input) { if (cnt < bits_per_digit_) { digit_idx <<= 1; } else { +#if 0 // Have a complete digit index, look up digit and add it. encoded_output.push_back(bitsToDigit(digit_idx)); +#else + encoded_output.push_back(digit_set_[digit_idx]); +#endif + digit_idx = 0; cnt = 0; } @@ -107,7 +112,11 @@ BaseNEncoder::encode(const std::vector<uint8_t>& input) { // We've exhausted bits, but have left over if (cnt) { digit_idx <<= (bits_per_digit_ - cnt); +#if 0 encoded_output.push_back(bitsToDigit(digit_idx)); +#else + encoded_output.push_back(digit_set_[digit_idx]); +#endif } // Add padding as needed. @@ -139,7 +148,11 @@ BaseNEncoder::decode(const std::string& encoded_str, std::vector<uint8_t>& outpu } // Translate the b64 digit to bits. +#if 0 uint8_t dig_bits = digitToBits(enc_digit); +#else + uint8_t dig_bits = bits_table_[enc_digit]; +#endif // Skip whitespace. if (dig_bits == 0xee) { diff --git a/src/lib/util/tests/encode_unittest.cc b/src/lib/util/tests/encode_unittest.cc index 6799df2b82..d90963db6b 100644 --- a/src/lib/util/tests/encode_unittest.cc +++ b/src/lib/util/tests/encode_unittest.cc @@ -392,4 +392,16 @@ TEST_F(Base16Test, mappingCheck) { mapTest(); } +TEST(toms,theirs64) { + std::vector<uint8_t>input{ 'f', 'o', 'o', 'b', 'a', 'r' }; + + int limit = 1000000; + for (int i = 0; i < limit; ++i) { + std::string encoded = encodeBase64(input); + std::vector<uint8_t>decoded; + decodeBase64(encoded, decoded); + EXPECT_EQ(decoded,input); + } +} + } diff --git a/src/lib/util/tests/strutil_unittest.cc b/src/lib/util/tests/strutil_unittest.cc index 563d4042c3..5372ba0c85 100644 --- a/src/lib/util/tests/strutil_unittest.cc +++ b/src/lib/util/tests/strutil_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2022 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this |