diff options
author | John Keeping <john@metanate.com> | 2022-11-18 16:13:17 +0000 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2023-01-16 18:01:10 +0800 |
commit | 93a6e60e49dd508888cde99514cbb4d6de569781 (patch) | |
tree | 2c0397448ef0cf2b360872d3ea9b265e6c8b7680 /lib/rc4.c | |
parent | ccaa55fb6e77ac1fa37e2e9451ecb4e5b60bf57a (diff) | |
download | u-boot-93a6e60e49dd508888cde99514cbb4d6de569781.tar.gz u-boot-93a6e60e49dd508888cde99514cbb4d6de569781.tar.bz2 u-boot-93a6e60e49dd508888cde99514cbb4d6de569781.zip |
rc4: mark key as const
Key data is never written so the parameter can be const, which allows
putting fixed keys in .rodata.
Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'lib/rc4.c')
-rw-r--r-- | lib/rc4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12,7 +12,7 @@ #endif #include <rc4.h> -void rc4_encode(unsigned char *buf, unsigned int len, unsigned char key[16]) +void rc4_encode(unsigned char *buf, unsigned int len, const unsigned char key[16]) { unsigned char s[256], k[256], temp; unsigned short i, j, t; |