Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bctoolbox for openSUSE:Factory checked in at 2022-03-01 19:07:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bctoolbox (Old) and /work/SRC/openSUSE:Factory/.bctoolbox.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bctoolbox" Tue Mar 1 19:07:03 2022 rev:31 rq:958306 version:5.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/bctoolbox/bctoolbox.changes 2022-02-02 22:45:02.002059797 +0100 +++ /work/SRC/openSUSE:Factory/.bctoolbox.new.1958/bctoolbox.changes 2022-03-01 19:07:05.760174513 +0100 @@ -1,0 +2,8 @@ +Tue Mar 1 15:29:09 UTC 2022 - Paolo Stivanin <i...@paolostivanin.com> + +- Update to version 5.1.0: + * new vfs read2/write2 functions without offset parameter, + to easy mapping with standard libc functions. + * optimized C++ logging macros. + +------------------------------------------------------------------- Old: ---- bctoolbox-5.0.67.tar.bz2 New: ---- bctoolbox-5.1.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bctoolbox.spec ++++++ --- /var/tmp/diff_new_pack.9zgKhg/_old 2022-03-01 19:07:06.244174497 +0100 +++ /var/tmp/diff_new_pack.9zgKhg/_new 2022-03-01 19:07:06.248174497 +0100 @@ -18,7 +18,7 @@ %define sover 1 Name: bctoolbox -Version: 5.0.67 +Version: 5.1.0 Release: 0 Summary: Utility library for software from Belledonne Communications License: GPL-3.0-only ++++++ bctoolbox-5.0.67.tar.bz2 -> bctoolbox-5.1.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/CHANGELOG.md new/bctoolbox-5.1.0/CHANGELOG.md --- old/bctoolbox-5.0.67/CHANGELOG.md 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/CHANGELOG.md 2022-02-03 15:07:48.000000000 +0100 @@ -7,6 +7,15 @@ ## [Unreleased] +## [5.1.0] - 2022-02-14 + +### Added +- new vfs read2/write2 functions without offset parameter, to easy mapping with standard libc functions. + +### Changed +- optimized C++ logging macros. + + ## [5.0.0] - 2021-07-08 ### Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/CMakeLists.txt new/bctoolbox-5.1.0/CMakeLists.txt --- old/bctoolbox-5.0.67/CMakeLists.txt 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/CMakeLists.txt 2022-02-03 15:07:48.000000000 +0100 @@ -28,7 +28,7 @@ cmake_policy(SET CMP0077 NEW) endif() -project(bctoolbox VERSION 5.0.0) +project(bctoolbox VERSION 5.1.0) set(BCTOOLBOX_VERSION "${PROJECT_VERSION}") set(BCTOOLBOX_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/include/bctoolbox/crypto.hh new/bctoolbox-5.1.0/include/bctoolbox/crypto.hh --- old/bctoolbox-5.0.67/include/bctoolbox/crypto.hh 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/include/bctoolbox/crypto.hh 2022-02-03 15:07:48.000000000 +0100 @@ -84,6 +84,14 @@ /*** Hash related function ***/ /*****************************************************************************/ /** + * @brief SHA1 buffer size definition + */ +struct SHA1 { + /// maximum output size for SHA1 is 20 bytes + static constexpr size_t ssize() {return 20;} +}; + +/** * @brief SHA256 buffer size definition */ struct SHA256 { @@ -122,6 +130,7 @@ template <typename hashAlgo> std::vector<uint8_t> HMAC(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input); /* declare template specialisations */ +template <> std::vector<uint8_t> HMAC<SHA1>(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input); template <> std::vector<uint8_t> HMAC<SHA256>(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input); template <> std::vector<uint8_t> HMAC<SHA384>(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input); template <> std::vector<uint8_t> HMAC<SHA512>(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/include/bctoolbox/utils.hh new/bctoolbox-5.1.0/include/bctoolbox/utils.hh --- old/bctoolbox-5.0.67/include/bctoolbox/utils.hh 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/include/bctoolbox/utils.hh 2022-02-03 15:07:48.000000000 +0100 @@ -40,6 +40,8 @@ return object; } + BCTBX_PUBLIC std::string fold (const std::string &str); + BCTBX_PUBLIC std::string unfold (const std::string &str); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/include/bctoolbox/vfs.h new/bctoolbox-5.1.0/include/bctoolbox/vfs.h --- old/bctoolbox-5.0.67/include/bctoolbox/vfs.h 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/include/bctoolbox/vfs.h 2022-02-03 15:07:48.000000000 +0100 @@ -123,6 +123,17 @@ BCTBX_PUBLIC ssize_t bctbx_file_read(bctbx_vfs_file_t *pFile, void *buf, size_t count, off_t offset); /** + * Attempts to read count bytes from the open file given by pFile, at the position starting at its offset + * in the file and and puts them in the buffer pointed by buf. + * The file offset shall be incremented by the number of bytes actually read. + * @param pFile bctbx_vfs_file_t File handle pointer. + * @param buf Buffer holding the read bytes. + * @param count Number of bytes to read. + * @return Number of bytes read on success, BCTBX_VFS_ERROR otherwise. + */ +BCTBX_PUBLIC ssize_t bctbx_file_read2(bctbx_vfs_file_t *pFile, void *buf, size_t count); + +/** * Close the file from its descriptor pointed by thw bctbx_vfs_file_t handle. * @param pFile File handle pointer. * @return return value from the pFuncClose VFS Close function on success, @@ -179,6 +190,17 @@ BCTBX_PUBLIC ssize_t bctbx_file_write(bctbx_vfs_file_t *pFile, const void *buf, size_t count, off_t offset); /** + * Write count bytes contained in buf to a file associated with pFile at the position starting at its + * offset. Calls pFuncWrite (set to bc_Write by default). + * The file offset shall be incremented by the number of bytes actually written. + * @param pFile File handle pointer. + * @param buf Buffer hodling the values to write. + * @param count Number of bytes to write to the file. + * @return Number of bytes written on success, BCTBX_VFS_ERROR if an error occurred. + */ +BCTBX_PUBLIC ssize_t bctbx_file_write2(bctbx_vfs_file_t *pFile, const void *buf, size_t count); + +/** * Writes to file. * @param pFile File handle pointer. * @param offset where to write in the file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/src/crypto/mbedtls.cc new/bctoolbox-5.1.0/src/crypto/mbedtls.cc --- old/bctoolbox-5.0.67/src/crypto/mbedtls.cc 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/src/crypto/mbedtls.cc 2022-02-03 15:07:48.000000000 +0100 @@ -138,6 +138,13 @@ return std::vector<uint8_t>(0); } +/* HMAC specialized template for SHA1 */ +template <> std::vector<uint8_t> HMAC<SHA1>(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input) { + std::vector<uint8_t> hmacOutput(SHA1::ssize()); + mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA1), key.data(), key.size(), input.data(), input.size(), hmacOutput.data()); + return hmacOutput; +} + /* HMAC specialized template for SHA256 */ template <> std::vector<uint8_t> HMAC<SHA256>(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input) { std::vector<uint8_t> hmacOutput(SHA256::ssize()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/src/utils/utils.cc new/bctoolbox-5.1.0/src/utils/utils.cc --- old/bctoolbox-5.0.67/src/utils/utils.cc 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/src/utils/utils.cc 2022-02-03 15:07:48.000000000 +0100 @@ -32,4 +32,46 @@ return out; } +string bctoolbox::Utils::fold (const string &str) { + string output = str; + size_t crlf = 0; + size_t next_crlf = 0; + const char *endline = "\r\n"; + while (next_crlf != string::npos) { + next_crlf = output.find(endline, crlf); + if (next_crlf != string::npos) { + if (next_crlf - crlf > 75) { + output.insert(crlf + 74, "\r\n "); + crlf += 76; + } else { + crlf = next_crlf + 2; + } + } + } + + return output; +} + +string bctoolbox::Utils::unfold (const string &str) { + string output = str; + const char *endline = "\r\n"; + size_t crlf = output.find(endline); + + if (crlf == string::npos) { + endline = "\n"; + crlf = output.find(endline); + } + + while (crlf != string::npos) { + if (isspace(output[crlf + strlen(endline)])) { + output.erase(crlf, strlen(endline) + 1); + } else { + crlf += strlen(endline); + } + + crlf = output.find(endline, crlf); + } + + return output; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/src/vfs/vfs.c new/bctoolbox-5.1.0/src/vfs/vfs.c --- old/bctoolbox-5.0.67/src/vfs/vfs.c 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/src/vfs/vfs.c 2022-02-03 15:07:48.000000000 +0100 @@ -75,6 +75,14 @@ return BCTBX_VFS_ERROR; } +ssize_t bctbx_file_write2(bctbx_vfs_file_t* pFile, const void *buf, size_t count) { + ssize_t ret = bctbx_file_write(pFile, buf, count, pFile->offset); + if (ret != BCTBX_VFS_ERROR) { + bctbx_file_seek(pFile, ret, SEEK_CUR); + } + return ret; +} + static int file_open(bctbx_vfs_t* pVfs, bctbx_vfs_file_t* pFile, const char *fName, const int oflags) { int ret = BCTBX_VFS_ERROR; if (pVfs && pFile ) { @@ -149,6 +157,14 @@ } return ret; } + +ssize_t bctbx_file_read2(bctbx_vfs_file_t *pFile, void *buf, size_t count) { + ssize_t ret = bctbx_file_read(pFile, buf, count, pFile->offset); + if (ret != BCTBX_VFS_ERROR) { + bctbx_file_seek(pFile, ret, SEEK_CUR); + } + return ret; +} int bctbx_file_close(bctbx_vfs_file_t *pFile) { int ret = BCTBX_VFS_ERROR; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.67/tester/crypto.cc new/bctoolbox-5.1.0/tester/crypto.cc --- old/bctoolbox-5.0.67/tester/crypto.cc 2021-10-08 16:54:28.000000000 +0200 +++ new/bctoolbox-5.1.0/tester/crypto.cc 2022-02-03 15:07:48.000000000 +0100 @@ -556,18 +556,24 @@ /* SHA patterns */ char const *sha_input = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; - uint8_t sha256_pattern[] = {0xcf, 0x5b, 0x16, 0xa7, 0x78, 0xaf, 0x83, 0x80, 0x03, 0x6c, 0xe5, 0x9e, 0x7b, 0x04, 0x92, 0x37, 0x0b, 0x24, 0x9b, 0x11, 0xe8, 0xf0, 0x7a, 0x51, 0xaf, 0xac, 0x45, 0x03, 0x7a, 0xfe, 0xe9, 0xd1}; + uint8_t sha256_pattern[] = {0xcf, 0x5b, 0x16, 0xa7, 0x78, 0xaf, 0x83, 0x80, 0x03, 0x6c, 0xe5, 0x9e, 0x7b, 0x04, 0x92, 0x37, 0x0b, 0x24, 0x9b, 0x11, 0xe8, 0xf0, 0x7a, 0x51, 0xaf, 0xac, 0x45, 0x03, 0x7a, 0xfe, 0xe9, 0xd1}; uint8_t sha384_pattern[] = {0x09, 0x33, 0x0c, 0x33, 0xf7, 0x11, 0x47, 0xe8, 0x3d, 0x19, 0x2f, 0xc7, 0x82, 0xcd, 0x1b, 0x47, 0x53, 0x11, 0x1b, 0x17, 0x3b, 0x3b, 0x05, 0xd2, 0x2f, 0xa0, 0x80, 0x86, 0xe3, 0xb0, 0xf7, 0x12, 0xfc, 0xc7, 0xc7, 0x1a, 0x55, 0x7e, 0x2d, 0xb9, 0x66, 0xc3, 0xe9, 0xfa, 0x91, 0x74, 0x60, 0x39}; uint8_t sha512_pattern[] = {0x8e, 0x95, 0x9b, 0x75, 0xda, 0xe3, 0x13, 0xda, 0x8c, 0xf4, 0xf7, 0x28, 0x14, 0xfc, 0x14, 0x3f, 0x8f, 0x77, 0x79, 0xc6, 0xeb, 0x9f, 0x7f, 0xa1, 0x72, 0x99, 0xae, 0xad, 0xb6, 0x88, 0x90, 0x18, 0x50, 0x1d, 0x28, 0x9e, 0x49, 0x00, 0xf7, 0xe4, 0x33, 0x1b, 0x99, 0xde, 0xc4, 0xb5, 0x43, 0x3a, 0xc7, 0xd3, 0x29, 0xee, 0xb6, 0xdd, 0x26, 0x54, 0x5e, 0x96, 0xe5, 0x5b, 0x87, 0x4b, 0xe9, 0x09}; /* HMAC SHA patterns from RFC 4231 test case 7 */ std::vector<uint8_t> hmac_sha_key{0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}; std::vector<uint8_t> hmac_sha_data{0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x48, 0x4d, 0x41, 0x43, 0x20, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x2e}; - std::vector<uint8_t> hmac_sha256_pattern{0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, 0x27, 0x63, 0x5f, 0xbc, 0xd5, 0xb0, 0xe9, 0x44, 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93, 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2}; + std::vector<uint8_t> hmac_sha256_pattern{0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, 0x27, 0x63, 0x5f, 0xbc, 0xd5, 0xb0, 0xe9, 0x44, 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93, 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2}; std::vector<uint8_t> hmac_sha384_pattern{0x66, 0x17, 0x17, 0x8e, 0x94, 0x1f, 0x02, 0x0d, 0x35, 0x1e, 0x2f, 0x25, 0x4e, 0x8f, 0xd3, 0x2c, 0x60, 0x24, 0x20, 0xfe, 0xb0, 0xb8, 0xfb, 0x9a, 0xdc, 0xce, 0xbb, 0x82, 0x46, 0x1e, 0x99, 0xc5, 0xa6, 0x78, 0xcc, 0x31, 0xe7, 0x99, 0x17, 0x6d, 0x38, 0x60, 0xe6, 0x11, 0x0c, 0x46, 0x52, 0x3e}; std::vector<uint8_t> hmac_sha512_pattern{0xe3, 0x7b, 0x6a, 0x77, 0x5d, 0xc8, 0x7d, 0xba, 0xa4, 0xdf, 0xa9, 0xf9, 0x6e, 0x5e, 0x3f, 0xfd, 0xde, 0xbd, 0x71, 0xf8, 0x86, 0x72, 0x89, 0x86, 0x5d, 0xf5, 0xa3, 0x2d, 0x20, 0xcd, 0xc9, 0x44, 0xb6, 0x02, 0x2c, 0xac, 0x3c, 0x49, 0x82, 0xb1, 0x0d, 0x5e, 0xeb, 0x55, 0xc3, 0xe4, 0xde, 0x15, 0x13, 0x46, 0x76, 0xfb, 0x6d, 0xe0, 0x44, 0x60, 0x65, 0xc9, 0x74, 0x40, 0xfa, 0x8c, 0x6a, 0x58}; - uint8_t outputBuffer[64]; + /* HMAC SHA 1 pattern from RFC 2202 */ + std::vector<uint8_t> hmac_sha1_key{0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b}; + std::string data = "Hi There"; + std::vector<uint8_t> hmac_sha1_data(data.begin(), data.end()); + std::vector<uint8_t> hmac_sha1_pattern{0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64, 0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e, 0xf1, 0x46, 0xbe, 0x00}; + + uint8_t outputBuffer[64]; bctbx_sha256((uint8_t *)sha_input, strlen(sha_input), 32, outputBuffer); BC_ASSERT_TRUE(memcmp(outputBuffer, sha256_pattern, 32)==0); @@ -579,6 +585,9 @@ BC_ASSERT_TRUE(memcmp(outputBuffer, sha512_pattern, 64)==0); /* C api */ + bctbx_hmacSha1(hmac_sha1_key.data(), hmac_sha1_key.size(), hmac_sha1_data.data(), hmac_sha1_data.size(), 20, outputBuffer); + BC_ASSERT_TRUE(memcmp(outputBuffer, hmac_sha1_pattern.data(), 20)==0); + bctbx_hmacSha256(hmac_sha_key.data(), hmac_sha_key.size(), hmac_sha_data.data(), hmac_sha_data.size(), 32, outputBuffer); BC_ASSERT_TRUE(memcmp(outputBuffer, hmac_sha256_pattern.data(), 32)==0); @@ -590,7 +599,8 @@ #ifdef HAVE_MBEDTLS /* C++ api */ - BC_ASSERT_TRUE(std::equal(hmac_sha256_pattern.cbegin(), hmac_sha256_pattern.cend(), bctoolbox::HMAC<SHA256>(hmac_sha_key, hmac_sha_data).cbegin())); + BC_ASSERT_TRUE(std::equal(hmac_sha1_pattern.cbegin(), hmac_sha1_pattern.cend(), bctoolbox::HMAC<SHA1>(hmac_sha1_key, hmac_sha1_data).cbegin())); + BC_ASSERT_TRUE(std::equal(hmac_sha256_pattern.cbegin(), hmac_sha256_pattern.cend(), bctoolbox::HMAC<SHA256>(hmac_sha_key, hmac_sha_data).cbegin())); BC_ASSERT_TRUE(std::equal(hmac_sha384_pattern.cbegin(), hmac_sha384_pattern.cend(), bctoolbox::HMAC<SHA384>(hmac_sha_key, hmac_sha_data).cbegin())); BC_ASSERT_TRUE(std::equal(hmac_sha384_pattern.cbegin(), hmac_sha384_pattern.cend(), bctoolbox::HMAC<SHA384>(hmac_sha_key, hmac_sha_data).cbegin()));