Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Unified Diff: srtp/crypto/include/datatypes.h

Issue 889083003: Update libsrtp to upstream 1.5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libsrtp@master
Patch Set: Updated to libsrtp 1.5.1 Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « srtp/crypto/include/crypto_types.h ('k') | srtp/crypto/include/err.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: srtp/crypto/include/datatypes.h
diff --git a/srtp/crypto/include/datatypes.h b/srtp/crypto/include/datatypes.h
index 7993b5876602256e908521e5cb1b32f494ebc57f..c930cfb29383d27d2848978242a08802879c98cd 100644
--- a/srtp/crypto/include/datatypes.h
+++ b/srtp/crypto/include/datatypes.h
@@ -70,7 +70,6 @@
#endif
-
/* if DATATYPES_USE_MACROS is defined, then little functions are macros */
#define DATATYPES_USE_MACROS
@@ -99,6 +98,12 @@ typedef union {
uint64_t v64[2];
} v128_t;
+typedef union {
+ uint8_t v8[32];
+ uint16_t v16[16];
+ uint32_t v32[8];
+ uint64_t v64[4];
+} v256_t;
/* some useful and simple math functions */
@@ -384,7 +389,7 @@ void
octet_string_set_to_zero(uint8_t *s, int len);
-#ifndef SRTP_KERNEL_LINUX
+#if !defined(SRTP_KERNEL_LINUX) //&& defined(HAVE_CONFIG_H)
/*
* Convert big endian integers to CPU byte order.
@@ -402,7 +407,7 @@ octet_string_set_to_zero(uint8_t *s, int len);
#if defined(__GNUC__) && defined(HAVE_X86)
/* Fall back. */
-static INLINE uint32_t be32_to_cpu(uint32_t v) {
+static inline uint32_t be32_to_cpu(uint32_t v) {
/* optimized for x86. */
asm("bswap %0" : "=r" (v) : "0" (v));
return v;
@@ -416,7 +421,7 @@ static INLINE uint32_t be32_to_cpu(uint32_t v) {
# define be32_to_cpu(x) ntohl((x))
# endif /* HAVE_X86 */
-static INLINE uint64_t be64_to_cpu(uint64_t v) {
+static inline uint64_t be64_to_cpu(uint64_t v) {
# ifdef NO_64BIT_MATH
/* use the make64 functions to do 64-bit math */
v = make64(htonl(low32(v)),htonl(high32(v)));
@@ -510,4 +515,8 @@ bitvector_left_shift(bitvector_t *x, int index);
char *
bitvector_bit_string(bitvector_t *x, char* buf, int len);
+#ifdef TESTAPP_SOURCE
+int base64_string_to_octet_string(char *raw, int *pad, char *base64, int len);
+#endif
+
#endif /* _DATATYPES_H */
« no previous file with comments | « srtp/crypto/include/crypto_types.h ('k') | srtp/crypto/include/err.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698