Sin descripción

RSAEncryptor.h 816B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // RSAEncryptor.h
  3. // SecTest
  4. //
  5. // Created by ascii on 15/2/10.
  6. // Copyright (c) 2015年 ascii. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface RSAEncryptor : NSObject
  10. #pragma mark - Instance Methods
  11. -(void) loadPublicKeyFromFile: (NSString*) derFilePath;
  12. -(void) loadPublicKeyFromData: (NSData*) derData;
  13. -(void) loadPrivateKeyFromFile: (NSString*) p12FilePath password:(NSString*)p12Password;
  14. -(void) loadPrivateKeyFromData: (NSData*) p12Data password:(NSString*)p12Password;
  15. -(NSString*) rsaEncryptString:(NSString*)string;
  16. -(NSData*) rsaEncryptData:(NSData*)data ;
  17. -(NSString*) rsaDecryptString:(NSString*)string;
  18. -(NSData*) rsaDecryptData:(NSData*)data;
  19. #pragma mark - Class Methods
  20. +(void) setSharedInstance: (RSAEncryptor*)instance;
  21. +(RSAEncryptor*) sharedInstance;
  22. @end