]> git.saurik.com Git - apple/security.git/blob - certificates/ota_cert_tool/ios_ota_cert_tool/PSUtilities.h
Security-57031.40.6.tar.gz
[apple/security.git] / certificates / ota_cert_tool / ios_ota_cert_tool / PSUtilities.h
1 //
2 // PSUtilities.h
3 // ios_ota_cert_tool
4 //
5 // Created by James Murphy on 12/12/12.
6 // Copyright (c) 2012 James Murphy. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import <CoreFoundation/CoreFoundation.h>
11 #import <Security/Security.h>
12
13 @interface PSUtilities : NSObject
14
15 + (NSString*)digestAndEncode:(CFDataRef)cfData useSHA1:(BOOL)useSHA1;
16
17 + (CFDataRef)readFile:(NSString *)file_path;
18
19 + (SecCertificateRef)getCertificateFromData:(CFDataRef)data;
20
21 + (CFDataRef)getKeyDataFromCertificate:(SecCertificateRef)cert;
22
23 + (SecKeyRef)getPrivateKeyWithName:(NSString *)keyName;
24
25 + (NSString *)signAndEncode:(CFDataRef)data usingKey:(SecKeyRef)key useSHA1:(BOOL)useSHA1;
26
27
28 @end