mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
common: make hdr parameter const
cryptomsg_decrypt_header doesn't modify hdr, so we should make it const.
This commit is contained in:
parent
8d9f033954
commit
fca50eaebc
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user