Index: test/util.h |
diff --git a/srtp/crypto/include/alloc.h b/test/util.h |
similarity index 79% |
rename from srtp/crypto/include/alloc.h |
rename to test/util.h |
index 5980eed6c13c6be2c43be308cc3e9d8a81676386..1dbc40685731d218f53d7770be42b292088f4793 100644 |
--- a/srtp/crypto/include/alloc.h |
+++ b/test/util.h |
@@ -1,32 +1,32 @@ |
/* |
- * alloc.h |
+ * util.h |
* |
- * interface to memory allocation and deallocation, with optional debugging |
+ * Utilities used by the test apps |
* |
- * David A. McGrew |
+ * John A. Foley |
* Cisco Systems, Inc. |
*/ |
/* |
- * |
- * Copyright (c) 2001-2006 Cisco Systems, Inc. |
+ * |
+ * Copyright (c) 2014, Cisco Systems, Inc. |
* All rights reserved. |
- * |
+ * |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
- * |
+ * |
* Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
- * |
+ * |
* Redistributions in binary form must reproduce the above |
* copyright notice, this list of conditions and the following |
* disclaimer in the documentation and/or other materials provided |
* with the distribution. |
- * |
+ * |
* Neither the name of the Cisco Systems, Inc. nor the names of its |
* contributors may be used to endorse or promote products derived |
* from this software without specific prior written permission. |
- * |
+ * |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
@@ -41,17 +41,13 @@ |
* OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
*/ |
+#ifndef _UTIL_H |
+#define _UTIL_H |
+#define MAX_PRINT_STRING_LEN 1024 |
-#ifndef CRYPTO_ALLOC_H |
-#define CRYPTO_ALLOC_H |
- |
-#include "datatypes.h" |
- |
-void * |
-crypto_alloc(size_t size); |
- |
-void |
-crypto_free(void *ptr); |
+int hex_string_to_octet_string(char *raw, char *hex, int len); |
+char * octet_string_hex_string(const void *s, int length); |
+int base64_string_to_octet_string(char *raw, int *pad, char *base64, int len); |
-#endif /* CRYPTO_ALLOC_H */ |
+#endif |