12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // KMDSignatureManager.h
- // SignFlow
- //
- // Created by 丁林圭 on 2021/8/2.
- //
- #import <Foundation/Foundation.h>
- #define DSignatureDidStartLoadNotification @"DSignatureDidStartLoadNotification"
- #define DSignatureDidFinishLoadNotification @"DSignatureDidFinishLoadNotification"
- @interface KMDSignatureModel: NSObject
- @property (nonatomic,assign) SecIdentityRef identityRef;
- @property (nonatomic,retain) NSString *name;
- @property (nonatomic,retain) NSDate *expiresDate;
- @property (nonatomic,retain) NSString *issusName;
- @property (nonatomic,retain) NSString *DN;
- @property (nonatomic,assign) BOOL isFormKeyChain;
- @property (nonatomic,retain) NSString *filePath;
- @property (nonatomic,retain) NSString *password;
- @end
- @interface KMDSignatureManager : NSObject
- @property (nonatomic,readonly) NSMutableArray *signatures;
- + (KMDSignatureManager *)defaultManager;
- + (BOOL)exportKeyChainWithP12FilePath:(NSString *)filePath signatureModel:(KMDSignatureModel *)model passWord:(NSString *)passWord;
- + (SecIdentityRef)privateKeyUsingSecItemImportFromP12File:(NSString *)filePath password:(NSString *)password;
- - (void)loadAllKeyChainCertificates;
- - (BOOL)importKeyChainWithP12FilePath:(NSString *)filePath passWord:(NSString *)passWord;
- - (BOOL)moveP12DigitalFileWithFilePath:(NSString *)filePath password:(NSString *)password;
- - (void)addSignatureCertPath:(NSString *)filePath passWord:(NSString *)password;
- - (BOOL)removeSignatureCertPath:(NSString *)filePath;
- - (NSArray *)sortContens:(NSArray *)contens;
- @end
|