From 9709b2e6fd84cab48fc7844475518f68f937bb01 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 25 Apr 2016 18:47:53 +0200 Subject: Import osmo_{encode,decode}_big_endian() from openbsc --- include/osmocom/core/utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/osmocom/core/utils.h') diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 27e1e188..dbc454f6 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -76,4 +76,8 @@ static inline void osmo_talloc_replace_string(void *ctx, char **dst, char *newst *dst = talloc_strdup(ctx, newstr); } +int osmo_constant_time_cmp(const uint8_t *exp, const uint8_t *rel, const int count); +uint64_t osmo_decode_big_endian(const uint8_t *data, size_t data_len); +uint8_t *osmo_encode_big_endian(uint64_t value, size_t data_len); + /*! @} */ -- cgit v1.2.3