]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_keychain/libDER/libDERUtils/fileIo.h
Security-57740.51.3.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / libDER / libDERUtils / fileIo.h
1 /*
2 * Copyright (c) 2005-2007,2010-2011 Apple Inc. All Rights Reserved.
3 */
4
5 #ifndef _DER_FILE_IO_H_
6 #define _DER_FILE_IO_H_
7
8 /*
9 * Read entire file.
10 */
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 int readFile(
16 const char *fileName,
17 unsigned char **bytes, // mallocd and returned
18 unsigned *numBytes); // returned
19
20 int writeFile(
21 const char *fileName,
22 const unsigned char *bytes,
23 unsigned numBytes);
24
25 #ifdef __cplusplus
26 }
27 #endif
28
29 #endif /* _DER_FILE_IO_H_ */