diff --git a/ccsrc/security/include/sha1.hh b/ccsrc/security/include/sha1.hh index 69f35dae16df31a1cc8199da631b07373c7a6517..e053544a88354affce96dc3a2e028a012df946ee 100644 --- a/ccsrc/security/include/sha1.hh +++ b/ccsrc/security/include/sha1.hh @@ -1,66 +1,66 @@ -/*! - * \file sha1.hh - * \brief Header file for SHA-1 helper methods. - * \author ETSI STF637 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include - -class OCTETSTRING; //! TITAN forward declaration - -/*! - * \class sha1 - * \brief This class provides description of SHA-1 helper methods - */ -class sha1 { - SHA_CTX _ctx; //! SHA context -public: - /*! - * \brief Default constructor - * Create a new instance of the sha1 class - */ - explicit sha1() : _ctx{} {}; - /*! - * \brief Default destructor - */ - virtual ~sha1(){}; - - /*! - * \fn int generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_buffer The data used to generate the SHA-1 hash - * \param[out] p_hash The SHA-1 hash value based of the provided data - * \return 0 on success, -1 otherwise - */ - int generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash); - - /*! - * \fn int generate(const unsigned char* p_buffer, OCTETSTRING& p_hash); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_buffer The data used to generate the SHA-1 hash - * \param[in] The length of the data buffer - * \param[out] p_hash The SHA-1 hash value based of the provided data - * \return 0 on success, -1 otherwise - */ - int generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash); - - /*! - * \fn const OCTETSTRING get_sha1_empty_string() const; - * \brief Return the SHA-1 of an empty string - * \return The SHA-1 of an empty string - */ - inline const OCTETSTRING get_sha1_empty_string() const { - static unsigned char sha1_empty_string[] = { - 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, - 0xaf, 0xd8, 0x07, 0x09}; //! SHA-1 of an empty string - return OCTETSTRING(20, sha1_empty_string); - }; - -}; // End of class sha1 +/*! + * \file sha1.hh + * \brief Header file for SHA-1 helper methods. + * \author ETSI STF637 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include + +class OCTETSTRING; //! TITAN forward declaration + +/*! + * \class sha1 + * \brief This class provides description of SHA-1 helper methods + */ +class sha1 { + SHA_CTX _ctx; //! SHA context +public: + /*! + * \brief Default constructor + * Create a new instance of the sha1 class + */ + explicit sha1() : _ctx{} {}; + /*! + * \brief Default destructor + */ + virtual ~sha1(){}; + + /*! + * \fn int generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_buffer The data used to generate the SHA-1 hash + * \param[out] p_hash The SHA-1 hash value based of the provided data + * \return 0 on success, -1 otherwise + */ + int generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash); + + /*! + * \fn int generate(const unsigned char* p_buffer, OCTETSTRING& p_hash); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_buffer The data used to generate the SHA-1 hash + * \param[in] The length of the data buffer + * \param[out] p_hash The SHA-1 hash value based of the provided data + * \return 0 on success, -1 otherwise + */ + int generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash); + + /*! + * \fn const OCTETSTRING get_sha1_empty_string() const; + * \brief Return the SHA-1 of an empty string + * \return The SHA-1 of an empty string + */ + inline const OCTETSTRING get_sha1_empty_string() const { + static unsigned char sha1_empty_string[] = { + 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, + 0xaf, 0xd8, 0x07, 0x09}; //! SHA-1 of an empty string + return OCTETSTRING(20, sha1_empty_string); + }; + +}; // End of class sha1 diff --git a/ccsrc/security/include/sha256.hh b/ccsrc/security/include/sha256.hh index fbb972dec298b0037e4f8af048740a0edc35dead..4973a2efd1f9c73d8bbab1b073e2d8d095cb453a 100644 --- a/ccsrc/security/include/sha256.hh +++ b/ccsrc/security/include/sha256.hh @@ -1,66 +1,66 @@ -/*! - * \file sha256.hh - * \brief Header file for SHA-256 helper methods. - * \author ETSI STF637 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include - -class OCTETSTRING; //! TITAN forward declaration - -/*! - * \class sha256 - * \brief This class provides description of SHA-256 helper methods - */ -class sha256 { - SHA256_CTX _ctx; //! SHA context -public: - /*! - * \brief Default constructor - * Create a new instance of the sha256 class - */ - explicit sha256() : _ctx{} {}; - /*! - * \brief Default destructor - */ - virtual ~sha256(){}; - - /*! - * \fn int generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_buffer The data used to generate the SHA-256 hash - * \param[out] p_hash The SHA-256 hash value based of the provided data - * \return 0 on success, -1 otherwise - */ - int generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash); - - /*! - * \fn int generate(const unsigned char* p_buffer, OCTETSTRING& p_hash); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_buffer The data used to generate the SHA-256 hash - * \param[in] The length of the data buffer - * \param[out] p_hash The SHA-256 hash value based of the provided data - * \return 0 on success, -1 otherwise - */ - int generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash); - - /*! - * \fn const OCTETSTRING get_sha256_empty_string() const; - * \brief Return the SHA-256 of an empty string - * \return The SHA-256 of an empty string - */ - inline const OCTETSTRING get_sha256_empty_string() const { - static unsigned char sha256_empty_string[] = { - 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, - 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}; //! SHA-256 of an empty string - return OCTETSTRING(32, sha256_empty_string); - }; - -}; // End of class sha256 +/*! + * \file sha256.hh + * \brief Header file for SHA-256 helper methods. + * \author ETSI STF637 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include + +class OCTETSTRING; //! TITAN forward declaration + +/*! + * \class sha256 + * \brief This class provides description of SHA-256 helper methods + */ +class sha256 { + SHA256_CTX _ctx; //! SHA context +public: + /*! + * \brief Default constructor + * Create a new instance of the sha256 class + */ + explicit sha256() : _ctx{} {}; + /*! + * \brief Default destructor + */ + virtual ~sha256(){}; + + /*! + * \fn int generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_buffer The data used to generate the SHA-256 hash + * \param[out] p_hash The SHA-256 hash value based of the provided data + * \return 0 on success, -1 otherwise + */ + int generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash); + + /*! + * \fn int generate(const unsigned char* p_buffer, OCTETSTRING& p_hash); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_buffer The data used to generate the SHA-256 hash + * \param[in] The length of the data buffer + * \param[out] p_hash The SHA-256 hash value based of the provided data + * \return 0 on success, -1 otherwise + */ + int generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash); + + /*! + * \fn const OCTETSTRING get_sha256_empty_string() const; + * \brief Return the SHA-256 of an empty string + * \return The SHA-256 of an empty string + */ + inline const OCTETSTRING get_sha256_empty_string() const { + static unsigned char sha256_empty_string[] = { + 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, + 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}; //! SHA-256 of an empty string + return OCTETSTRING(32, sha256_empty_string); + }; + +}; // End of class sha256 diff --git a/ccsrc/security/include/sha384.hh b/ccsrc/security/include/sha384.hh index 016c54f81128099bf0dd3297b78a7d9c85948e51..67f2d19ad643aa114d08f0c343723c8f56682e22 100644 --- a/ccsrc/security/include/sha384.hh +++ b/ccsrc/security/include/sha384.hh @@ -1,60 +1,60 @@ -/*! - * \file sha384.hh - * \brief Header file for SHA-384 helper methods. - * \author ETSI STF637 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include - -class OCTETSTRING; //! TITAN forward declaration - -/*! - * \class sha384 - * \brief This class provides description of SHA-384 helper methods - */ -class sha384 { - SHA512_CTX _ctx; //! SHA context -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the sha384 class - */ - explicit sha384() : _ctx{} {}; - /*! - * \brief Default destructor - */ - virtual ~sha384(){}; - - /*! - * \fn int generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_buffer The data used to generate the SHA-384 hash - * \param[out] p_hash The SHA-384 hash value based of the provided data - * \return 0 on success, -1 otherwise - */ - int generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash); - - /*! - * \fn int generate(const OCTETSTRING p_buffer, OCTETSTRING& p_hash); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_buffer The data used to generate the SHA-384 hash - * \param[in] The length of the data buffer - * \param[out] p_hash The SHA-384 hash value based of the provided data - * \return 0 on success, -1 otherwise - */ - int generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash); - - /*! - * \fn const OCTETSTRING get_sha384_empty_string() const; - * \brief Return the SHA-384 of an empty string - * \return The SHA-384 of an empty string - */ - const OCTETSTRING get_sha384_empty_string() const; -}; // End of class sha384 +/*! + * \file sha384.hh + * \brief Header file for SHA-384 helper methods. + * \author ETSI STF637 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include + +class OCTETSTRING; //! TITAN forward declaration + +/*! + * \class sha384 + * \brief This class provides description of SHA-384 helper methods + */ +class sha384 { + SHA512_CTX _ctx; //! SHA context +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the sha384 class + */ + explicit sha384() : _ctx{} {}; + /*! + * \brief Default destructor + */ + virtual ~sha384(){}; + + /*! + * \fn int generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_buffer The data used to generate the SHA-384 hash + * \param[out] p_hash The SHA-384 hash value based of the provided data + * \return 0 on success, -1 otherwise + */ + int generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash); + + /*! + * \fn int generate(const OCTETSTRING p_buffer, OCTETSTRING& p_hash); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_buffer The data used to generate the SHA-384 hash + * \param[in] The length of the data buffer + * \param[out] p_hash The SHA-384 hash value based of the provided data + * \return 0 on success, -1 otherwise + */ + int generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash); + + /*! + * \fn const OCTETSTRING get_sha384_empty_string() const; + * \brief Return the SHA-384 of an empty string + * \return The SHA-384 of an empty string + */ + const OCTETSTRING get_sha384_empty_string() const; +}; // End of class sha384 diff --git a/ccsrc/security/module.mk b/ccsrc/security/module.mk index e05c42d318573e2a532777459269ef35f2d7a5f5..114a8ab6b83f1cd54db0a5abb17bd9b8f0a50ac2 100644 --- a/ccsrc/security/module.mk +++ b/ccsrc/security/module.mk @@ -9,5 +9,6 @@ sources := \ src/sha256.cc \ src/sha384.cc \ src/hmac.cc \ + # src/sm3.cc \ includes := ./include diff --git a/ccsrc/security/src/sha1.cc b/ccsrc/security/src/sha1.cc index bd9386d1d0075e36de8de94a263757ba97df84cd..21b051410669f6463093ef418ef8ba85915be1d0 100644 --- a/ccsrc/security/src/sha1.cc +++ b/ccsrc/security/src/sha1.cc @@ -1,39 +1,39 @@ -/*! - * \file sha1.cc - * \brief Source file for SHA-1 helper methods. - * \author ETSI STF637 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#include - -#include "sha1.hh" - -int sha1::generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash) { - // Sanity check - if (p_buffer.lengthof() == 0) { - p_hash = get_sha1_empty_string(); - return 0; - } - - return generate(static_cast(p_buffer), p_buffer.lengthof(), p_hash); -} - -int sha1::generate(const unsigned char* p_buffer, const size_t p_length, OCTETSTRING& p_hash) { - // Sanity check - if ((p_buffer == nullptr) || (p_length == 0)) { - p_hash = get_sha1_empty_string(); - return 0; - } - - // Resize data buffer - p_hash = int2oct(0, SHA_DIGEST_LENGTH); - // Compute the hash value - ::SHA1_Init(&_ctx); - ::SHA1_Update(&_ctx, p_buffer, p_length); - ::SHA1_Final((unsigned char*)static_cast(p_hash), &_ctx); - return 0; -}; +/*! + * \file sha1.cc + * \brief Source file for SHA-1 helper methods. + * \author ETSI STF637 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#include + +#include "sha1.hh" + +int sha1::generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash) { + // Sanity check + if (p_buffer.lengthof() == 0) { + p_hash = get_sha1_empty_string(); + return 0; + } + + return generate(static_cast(p_buffer), p_buffer.lengthof(), p_hash); +} + +int sha1::generate(const unsigned char* p_buffer, const size_t p_length, OCTETSTRING& p_hash) { + // Sanity check + if ((p_buffer == nullptr) || (p_length == 0)) { + p_hash = get_sha1_empty_string(); + return 0; + } + + // Resize data buffer + p_hash = int2oct(0, SHA_DIGEST_LENGTH); + // Compute the hash value + ::SHA1_Init(&_ctx); + ::SHA1_Update(&_ctx, p_buffer, p_length); + ::SHA1_Final((unsigned char*)static_cast(p_hash), &_ctx); + return 0; +}; diff --git a/ccsrc/security/src/sha256.cc b/ccsrc/security/src/sha256.cc index e1fdf07ef2076cddaef3cc7648d30c40e96533db..2238f0973236d5f43ddd9c53cc1a4213adf9c19b 100644 --- a/ccsrc/security/src/sha256.cc +++ b/ccsrc/security/src/sha256.cc @@ -1,39 +1,39 @@ -/*! - * \file sha256.cc - * \brief Source file for SHA-256 helper methods. - * \author ETSI STF637 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#include - -#include "sha256.hh" - -int sha256::generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash) { - // Sanity check - if (p_buffer.lengthof() == 0) { - p_hash = get_sha256_empty_string(); - return 0; - } - - return generate(static_cast(p_buffer), p_buffer.lengthof(), p_hash); -} - -int sha256::generate(const unsigned char* p_buffer, const size_t p_length, OCTETSTRING& p_hash) { - // Sanity check - if ((p_buffer == nullptr) || (p_length == 0)) { - p_hash = get_sha256_empty_string(); - return 0; - } - - // Resize data buffer - p_hash = int2oct(0, SHA256_DIGEST_LENGTH); - // Compute the hash value - ::SHA256_Init(&_ctx); - ::SHA256_Update(&_ctx, p_buffer, p_length); - ::SHA256_Final((unsigned char*)static_cast(p_hash), &_ctx); - return 0; -}; +/*! + * \file sha256.cc + * \brief Source file for SHA-256 helper methods. + * \author ETSI STF637 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#include + +#include "sha256.hh" + +int sha256::generate(const OCTETSTRING& p_buffer, OCTETSTRING& p_hash) { + // Sanity check + if (p_buffer.lengthof() == 0) { + p_hash = get_sha256_empty_string(); + return 0; + } + + return generate(static_cast(p_buffer), p_buffer.lengthof(), p_hash); +} + +int sha256::generate(const unsigned char* p_buffer, const size_t p_length, OCTETSTRING& p_hash) { + // Sanity check + if ((p_buffer == nullptr) || (p_length == 0)) { + p_hash = get_sha256_empty_string(); + return 0; + } + + // Resize data buffer + p_hash = int2oct(0, SHA256_DIGEST_LENGTH); + // Compute the hash value + ::SHA256_Init(&_ctx); + ::SHA256_Update(&_ctx, p_buffer, p_length); + ::SHA256_Final((unsigned char*)static_cast(p_hash), &_ctx); + return 0; +}; diff --git a/ccsrc/security/src/sha384.cc b/ccsrc/security/src/sha384.cc index 9ad92fbd043f3e5d838ca089147ee16510b13891..b32e4c252555d3044c10d45a3f30291939bdceca 100644 --- a/ccsrc/security/src/sha384.cc +++ b/ccsrc/security/src/sha384.cc @@ -1,47 +1,47 @@ -/*! - * \file sha384.cc - * \brief Sorce file for SHA-384 helper methods. - * \author ETSI STF637 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#include - -#include "sha384.hh" - -int sha384::generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash) { - // Sanity check - if (p_buffer.lengthof() == 0) { - p_hash = get_sha384_empty_string(); - return 0; - } - - return generate(static_cast(p_buffer), p_buffer.lengthof(), p_hash); -} - -int sha384::generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash) { - // Sanity check - if ((p_buffer == nullptr) || (p_length == 0)) { - p_hash = get_sha384_empty_string(); - return 0; - } - - // Resize data buffer - p_hash = int2oct(0, SHA384_DIGEST_LENGTH); - // Compute the hash value - ::SHA384_Init(&_ctx); - ::SHA384_Update(&_ctx, p_buffer, p_length); - ::SHA384_Final((unsigned char *)static_cast(p_hash), &_ctx); - return 0; -} - -const OCTETSTRING sha384::get_sha384_empty_string() const { - static unsigned char - sha384_empty_string[] = {0x38, 0xb0, 0x60, 0xa7, 0x51, 0xac, 0x96, 0x38, 0x4c, 0xd9, 0x32, 0x7e, 0xb1, 0xb1, 0xe3, 0x6a, - 0x21, 0xfd, 0xb7, 0x11, 0x14, 0xbe, 0x07, 0x43, 0x4c, 0x0c, 0xc7, 0xbf, 0x63, 0xf6, 0xe1, 0xda, - 0x27, 0x4e, 0xde, 0xbf, 0xe7, 0x6f, 0x65, 0xfb, 0xd5, 0x1a, 0xd2, 0xf1, 0x48, 0x98, 0xb9, 0x5b}; //! SHA-384 of an empty string - return OCTETSTRING(48, sha384_empty_string); -} +/*! + * \file sha384.cc + * \brief Sorce file for SHA-384 helper methods. + * \author ETSI STF637 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#include + +#include "sha384.hh" + +int sha384::generate(const OCTETSTRING &p_buffer, OCTETSTRING &p_hash) { + // Sanity check + if (p_buffer.lengthof() == 0) { + p_hash = get_sha384_empty_string(); + return 0; + } + + return generate(static_cast(p_buffer), p_buffer.lengthof(), p_hash); +} + +int sha384::generate(const unsigned char *p_buffer, const size_t p_length, OCTETSTRING &p_hash) { + // Sanity check + if ((p_buffer == nullptr) || (p_length == 0)) { + p_hash = get_sha384_empty_string(); + return 0; + } + + // Resize data buffer + p_hash = int2oct(0, SHA384_DIGEST_LENGTH); + // Compute the hash value + ::SHA384_Init(&_ctx); + ::SHA384_Update(&_ctx, p_buffer, p_length); + ::SHA384_Final((unsigned char *)static_cast(p_hash), &_ctx); + return 0; +} + +const OCTETSTRING sha384::get_sha384_empty_string() const { + static unsigned char + sha384_empty_string[] = {0x38, 0xb0, 0x60, 0xa7, 0x51, 0xac, 0x96, 0x38, 0x4c, 0xd9, 0x32, 0x7e, 0xb1, 0xb1, 0xe3, 0x6a, + 0x21, 0xfd, 0xb7, 0x11, 0x14, 0xbe, 0x07, 0x43, 0x4c, 0x0c, 0xc7, 0xbf, 0x63, 0xf6, 0xe1, 0xda, + 0x27, 0x4e, 0xde, 0xbf, 0xe7, 0x6f, 0x65, 0xfb, 0xd5, 0x1a, 0xd2, 0xf1, 0x48, 0x98, 0xb9, 0x5b}; //! SHA-384 of an empty string + return OCTETSTRING(48, sha384_empty_string); +}