]> git.saurik.com Git - apple/security.git/blobdiff - SecurityTests/cspxutils/utilLib/fileIo.h
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / cspxutils / utilLib / fileIo.h
diff --git a/SecurityTests/cspxutils/utilLib/fileIo.h b/SecurityTests/cspxutils/utilLib/fileIo.h
new file mode 100644 (file)
index 0000000..b079359
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Read entire file. 
+ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int cspReadFile(
+       const char                      *fileName,
+       unsigned char           **bytes,                // mallocd and returned
+       unsigned                        *numBytes);             // returned
+
+int cspWriteFile(
+       const char                      *fileName,
+       const unsigned char     *bytes,
+       unsigned                        numBytes);
+
+#ifdef __cplusplus
+}
+#endif