should work
[c11concurrency-benchmarks.git] / mabain / binaries / hexbin.h
diff --git a/mabain/binaries/hexbin.h b/mabain/binaries/hexbin.h
new file mode 100644 (file)
index 0000000..cb8d99a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * Copyright (C) 2017 Cisco Inc.
+ *
+ * This program is free software: you can redistribute it and/or  modify
+ * it under the terms of the GNU General Public License, version 2,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// @author Changxue Deng <chadeng@cisco.com>
+
+#ifndef __HEXBIN_H__
+#define __HEXBIN_H__
+
+#include <stdint.h>
+
+int bin_2_hex(const uint8_t *data, int len, char *buff, int buf_size);
+int hex_2_bin(const char *data, int len, uint8_t *buff, int buf_size);
+
+#endif