Skip to content

Commit

Permalink
Add missing const to cryptoHashOne() and cryptoHashOneStr().
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsteele committed Mar 16, 2019
1 parent 0eb4c2c commit 76560b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/xml/release.xml
Expand Up @@ -30,7 +30,7 @@
</release-item>

<release-item>
<p>Fix incorrect buffer size used in <code>cryptoHashOne()</code>.</p>
<p><code>CryptoHash</code> improvements and fixes. Fix incorrect buffer size used in <code>cryptoHashOne()</code>. Add missing <code>const</code> to <code>cryptoHashOne()</code> and <code>cryptoHashOneStr()</code>.</p>
</release-item>

<release-item>
Expand Down
4 changes: 2 additions & 2 deletions src/common/crypto/hash.c
Expand Up @@ -268,7 +268,7 @@ cryptoHashOneC(const String *type, const unsigned char *message, size_t messageS
Get hash for one Buffer
***********************************************************************************************************************************/
Buffer *
cryptoHashOne(const String *type, Buffer *message)
cryptoHashOne(const String *type, const Buffer *message)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(STRING, type);
Expand All @@ -285,7 +285,7 @@ cryptoHashOne(const String *type, Buffer *message)
Get hash for one String
***********************************************************************************************************************************/
Buffer *
cryptoHashOneStr(const String *type, String *message)
cryptoHashOneStr(const String *type, const String *message)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(STRING, type);
Expand Down
4 changes: 2 additions & 2 deletions src/common/crypto/hash.h
Expand Up @@ -51,9 +51,9 @@ void cryptoHashFree(CryptoHash *this);
/***********************************************************************************************************************************
Helper functions
***********************************************************************************************************************************/
Buffer *cryptoHashOne(const String *type, Buffer *message);
Buffer *cryptoHashOne(const String *type, const Buffer *message);
Buffer *cryptoHashOneC(const String *type, const unsigned char *message, size_t messageSize);
Buffer *cryptoHashOneStr(const String *type, String *message);
Buffer *cryptoHashOneStr(const String *type, const String *message);

Buffer *cryptoHmacOne(const String *type, const Buffer *key, const Buffer *message);

Expand Down

0 comments on commit 76560b3

Please sign in to comment.