Fix slight mismatch in definition of crypto_hash160
What changed, and why it matters
This commit only fixes a documentation/declaration inconsistency in a C header file. The function parameter name in the comment is changed from `in_len` to `inlen` to match the actual declaration, and the output pointer is annotated with a fixed-size array hint (`out[static 20]`) instead of a plain pointer. There is no change to executable code or behavior.
No security action required. This is a cosmetic/documentation consistency fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies src/crypto.h. It updates two Doxygen comments for crypto_ripemd160 and crypto_hash160 so the documented parameter name matches the prototype (inlen). It also changes the crypto_hash160 prototype’s output parameter from uint8_t *out to uint8_t out[static 20], which is a static array size hint for the C compiler. No implementation code is altered, no call sites are changed, and no runtime behavior is affected.
Changed components
src/crypto.hInspect captured patch +3 / −3
diff --git a/src/crypto.h b/src/crypto.h
index 1a694f9..b678734 100644
--- a/src/crypto.h
+++ b/src/crypto.h
@@ -178,7 +178,7 @@ static inline int crypto_hash_update_u32(cx_hash_t *hash_context, uint32_t data)
*
* @param[in] in
* Pointer to input data.
- * @param[in] in_len
+ * @param[in] inlen
* Length of input data.
* @param[out] out
* Pointer to the 160-bit (20 bytes) output array.
@@ -190,12 +190,12 @@ void crypto_ripemd160(const uint8_t *in, uint16_t inlen, uint8_t out[static 20])
*
* @param[in] in
* Pointer to input data.
- * @param[in] in_len
+ * @param[in] inlen
* Length of input data.
* @param[out] out
* Pointer to the 160-bit (20 bytes) output array.
*/
-void crypto_hash160(const uint8_t *in, uint16_t in_len, uint8_t *out);
+void crypto_hash160(const uint8_t *in, uint16_t inlen, uint8_t out[static 20]);
/**
* Computes the 33-bytes compressed public key from the uncompressed 65-bytes public key.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.