diff options
author | John Keeping <john@metanate.com> | 2022-11-18 16:13:17 +0000 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2022-12-26 13:36:31 +0800 |
commit | 1d2c5f45c9e66bf0709c19e0042c6948ae0ee675 (patch) | |
tree | 3b035ea447413a2700c413e1783e32f2925b13db | |
parent | 45cdddf2fb9bf6dc2849fdf512e49d404f1b2491 (diff) | |
download | u-boot-1d2c5f45c9e66bf0709c19e0042c6948ae0ee675.zip u-boot-1d2c5f45c9e66bf0709c19e0042c6948ae0ee675.tar.gz u-boot-1d2c5f45c9e66bf0709c19e0042c6948ae0ee675.tar.bz2 |
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>
-rw-r--r-- | include/rc4.h | 2 | ||||
-rw-r--r-- | lib/rc4.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/rc4.h b/include/rc4.h index c1ff134..d1257f2 100644 --- a/include/rc4.h +++ b/include/rc4.h @@ -15,6 +15,6 @@ * @len: Length of buffer in bytes * @key: 16-byte key to use */ -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]); #endif @@ -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; |