5 // Created by James Murphy on 12/12/12.
6 // Copyright (c) 2012 James Murphy. All rights reserved.
9 #import <Foundation/Foundation.h>
10 #import <CoreFoundation/CoreFoundation.h>
11 #import <Security/Security.h>
13 @interface PSUtilities
: NSObject
15 + (NSString
*)digestAndEncode
:(CFDataRef
)cfData useSHA1
:(BOOL
)useSHA1
;
17 + (CFDataRef
)readFile
:(NSString
*)file_path
;
19 + (SecCertificateRef
)getCertificateFromData
:(CFDataRef
)data
;
21 + (CFDataRef
)getKeyDataFromCertificate
:(SecCertificateRef
)cert
;
23 + (SecKeyRef
)getPrivateKeyWithName
:(NSString
*)keyName
;
25 + (NSString
*)signAndEncode
:(CFDataRef
)data usingKey
:(SecKeyRef
)key useSHA1
:(BOOL
)useSHA1
;