SAiOSKeychainPlugin.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // SAiOSPaypalPlugin.h
  3. // Keychain Plugin for Cordova
  4. //
  5. // Created by shazron on 10-11-05.
  6. // Copyright 2012 Shazron Abdullah. All rights reserved.
  7. #import <UIKit/UIKit.h>
  8. #import <Foundation/Foundation.h>
  9. #ifdef CORDOVA_FRAMEWORK
  10. #import <Cordova/CDVPlugin.h>
  11. #else
  12. #import "CDVPlugin.h"
  13. #endif
  14. @interface SAiOSKeychainPlugin : CDVPlugin {
  15. }
  16. - (void) getForKey:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
  17. - (void) setForKey:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
  18. - (void) removeForKey:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
  19. @end
  20. //
  21. // SFHFKeychainUtils.h
  22. //
  23. // Created by Buzz Andersen on 10/20/08.
  24. // Based partly on code by Jonathan Wight, Jon Crosby, and Mike Malone.
  25. // Copyright 2008 Sci-Fi Hi-Fi. All rights reserved.
  26. //
  27. // Permission is hereby granted, free of charge, to any person
  28. // obtaining a copy of this software and associated documentation
  29. // files (the "Software"), to deal in the Software without
  30. // restriction, including without limitation the rights to use,
  31. // copy, modify, merge, publish, distribute, sublicense, and/or sell
  32. // copies of the Software, and to permit persons to whom the
  33. // Software is furnished to do so, subject to the following
  34. // conditions:
  35. //
  36. // The above copyright notice and this permission notice shall be
  37. // included in all copies or substantial portions of the Software.
  38. //
  39. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  40. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  41. // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  42. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  43. // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  44. // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  45. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  46. // OTHER DEALINGS IN THE SOFTWARE.
  47. //
  48. @interface SFHFKeychainUtils : NSObject {
  49. }
  50. + (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error;
  51. + (BOOL) storeUsername: (NSString *) username andPassword: (NSString *) password forServiceName: (NSString *) serviceName updateExisting: (BOOL) updateExisting error: (NSError **) error;
  52. + (BOOL) deleteItemForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error;
  53. @end