summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2011-11-17 19:45:42 +0100
committerSylvain Munaut <tnt@246tNt.com>2011-11-17 19:45:58 +0100
commit3e387cb35c03ad814362267028c46d5d0972a257 (patch)
treedb05529358a442d57e3ff60db026fac418f5237d
parentf6c1d4cd81b556e25013daf15c3f3b2ef2108fa6 (diff)
gsm/a5: Add const qualifier on the key
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--include/osmocom/gsm/a5.h6
-rw-r--r--src/gsm/a5.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/include/osmocom/gsm/a5.h b/include/osmocom/gsm/a5.h
index 2c630e5f..55ce24dc 100644
--- a/include/osmocom/gsm/a5.h
+++ b/include/osmocom/gsm/a5.h
@@ -42,8 +42,8 @@ osmo_a5_fn_count(uint32_t fn)
* - fn is the _real_ GSM frame number.
* (converted internally to fn_count)
*/
-void osmo_a5(int n, uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
-void osmo_a5_1(uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
-void osmo_a5_2(uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
+void osmo_a5(int n, const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
+void osmo_a5_1(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
+void osmo_a5_2(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
#endif /* __OSMO_A5_H__ */
diff --git a/src/gsm/a5.c b/src/gsm/a5.c
index d3f2b2c3..fe341a6a 100644
--- a/src/gsm/a5.c
+++ b/src/gsm/a5.c
@@ -31,7 +31,7 @@
#include <osmocom/gsm/a5.h>
void
-osmo_a5(int n, uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul)
+osmo_a5(int n, const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul)
{
switch (n)
{
@@ -138,7 +138,7 @@ _a5_1_get_output(uint32_t r[])
}
void
-osmo_a5_1(uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul)
+osmo_a5_1(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul)
{
uint32_t r[3] = {0, 0, 0};
uint32_t fn_count;
@@ -244,7 +244,7 @@ _a5_2_get_output(uint32_t r[], uint8_t *db)
}
void
-osmo_a5_2(uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul)
+osmo_a5_2(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul)
{
uint32_t r[4] = {0, 0, 0, 0};
uint32_t fn_count;