Skip to content

Commit

Permalink
Merge pull request #565 from usafchn/develop
Browse files Browse the repository at this point in the history
Make the arg of mp_hash() const
  • Loading branch information
sjaeckel committed Aug 27, 2023
2 parents 3b6a727 + a2c6b09 commit 7f96509
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/bn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ \section{Hashing}

\index{mp\_hash}
\begin{alltt}
mp_err mp_hash (mp_int *a, mp_hval *hash);
mp_err mp_hash (const mp_int *a, mp_hval *hash);
\end{alltt}

This will create the hash of $a$ following the \mbox{FNV-1a} algorithm as described on
Expand Down
2 changes: 1 addition & 1 deletion doc/tommath.3
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ Returns \fBMP_MEM\fP if the functions fails to allocate enough memory.
.in -1i

.LP
.BI "mp_err mp_hash (mp_int *" a ", mp_hval *" hash ")"
.BI "mp_err mp_hash (const mp_int *" a ", mp_hval *" hash ")"
.in 1i
This will create the hash of \fBa\fP following the \fIFNV-1a\fP algorithm as described on
\fIhttp://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-1a\fP. With the
Expand Down
2 changes: 1 addition & 1 deletion mp_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#endif

/* computes hash of mp_int. */
mp_err mp_hash(mp_int *a, mp_hval *hash)
mp_err mp_hash(const mp_int *a, mp_hval *hash)
{
int x;
mp_hval hval = FNV_1A_INIT;
Expand Down
2 changes: 1 addition & 1 deletion tommath.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ typedef uint64_t mp_hval;
#endif

/* computes hash */
mp_err mp_hash(mp_int *a, mp_hval *hash) MP_WUR;
mp_err mp_hash(const mp_int *a, mp_hval *hash) MP_WUR;

/* ---> Primes <--- */

Expand Down

0 comments on commit 7f96509

Please sign in to comment.