Skip to content

Commit 7f96509

Browse files
authored
Merge pull request #565 from usafchn/develop
Make the arg of mp_hash() const
2 parents 3b6a727 + a2c6b09 commit 7f96509

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

doc/bn.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ \section{Hashing}
14491449

14501450
\index{mp\_hash}
14511451
\begin{alltt}
1452-
mp_err mp_hash (mp_int *a, mp_hval *hash);
1452+
mp_err mp_hash (const mp_int *a, mp_hval *hash);
14531453
\end{alltt}
14541454

14551455
This will create the hash of $a$ following the \mbox{FNV-1a} algorithm as described on

doc/tommath.3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Returns \fBMP_MEM\fP if the functions fails to allocate enough memory.
369369
.in -1i
370370

371371
.LP
372-
.BI "mp_err mp_hash (mp_int *" a ", mp_hval *" hash ")"
372+
.BI "mp_err mp_hash (const mp_int *" a ", mp_hval *" hash ")"
373373
.in 1i
374374
This will create the hash of \fBa\fP following the \fIFNV-1a\fP algorithm as described on
375375
\fIhttp://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-1a\fP. With the

mp_hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#endif
1313

1414
/* computes hash of mp_int. */
15-
mp_err mp_hash(mp_int *a, mp_hval *hash)
15+
mp_err mp_hash(const mp_int *a, mp_hval *hash)
1616
{
1717
int x;
1818
mp_hval hval = FNV_1A_INIT;

tommath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ typedef uint64_t mp_hval;
499499
#endif
500500

501501
/* computes hash */
502-
mp_err mp_hash(mp_int *a, mp_hval *hash) MP_WUR;
502+
mp_err mp_hash(const mp_int *a, mp_hval *hash) MP_WUR;
503503

504504
/* ---> Primes <--- */
505505

0 commit comments

Comments
 (0)