diff --git a/common/cryptomsg.c b/common/cryptomsg.c index 8c4bd93c2..1b50a1f18 100644 --- a/common/cryptomsg.c +++ b/common/cryptomsg.c @@ -118,7 +118,8 @@ u8 *cryptomsg_decrypt_body(const tal_t *ctx, return decrypted; } -bool cryptomsg_decrypt_header(struct crypto_state *cs, u8 hdr[18], u16 *lenp) +bool cryptomsg_decrypt_header(struct crypto_state *cs, const u8 hdr[18], + u16 *lenp) { unsigned char npub[crypto_aead_chacha20poly1305_ietf_NPUBBYTES]; unsigned long long mlen; diff --git a/common/cryptomsg.h b/common/cryptomsg.h index 19c6d3e90..3da33879c 100644 --- a/common/cryptomsg.h +++ b/common/cryptomsg.h @@ -25,7 +25,8 @@ u8 *cryptomsg_encrypt_msg(const tal_t *ctx, struct crypto_state *cs, const u8 *msg); -bool cryptomsg_decrypt_header(struct crypto_state *cs, u8 hdr[18], u16 *lenp); +bool cryptomsg_decrypt_header(struct crypto_state *cs, const u8 hdr[18], + u16 *lenp); u8 *cryptomsg_decrypt_body(const tal_t *ctx, struct crypto_state *cs, const u8 *in); #endif /* LIGHTNING_COMMON_CRYPTOMSG_H */