You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
6.6 KiB

  1. /*=============================================================================================================
  2. - TransKeyModalView.h
  3. =============================================================================================================*/
  4. /*=============================================================================================================
  5. modalView frame
  6. =============================================================================================================*/
  7. #define TYPE_SECUREKEYBOARD_TEXT 0
  8. #define TYPE_SECUREKEYBOARD_NUMBER 1
  9. #define SECUREKEYBOARD_NUMBER_WIDTH 303
  10. #define SECUREKEYBOARD_NUMBER_HEIGHT 390
  11. #define SECUREKEYBOARD_TEXT_WIDTH 657
  12. #define SECUREKEYBOARD_TEXT_HEIGHT 326
  13. #define SecureKeyboardWidth(type) ((type == TYPE_SECUREKEYBOARD_NUMBER)?SECUREKEYBOARD_NUMBER_WIDTH:SECUREKEYBOARD_TEXT_WIDTH)
  14. #define SecureKeyboardHeight(type) ((type == TYPE_SECUREKEYBOARD_NUMBER)?SECUREKEYBOARD_NUMBER_HEIGHT:SECUREKEYBOARD_TEXT_HEIGHT)
  15. #define SECURE_FIELD_HEIGHT 38
  16. @class TransKeyModalView;
  17. /*=============================================================================================================
  18. secureKeyboard delegate
  19. =============================================================================================================*/
  20. @protocol TransKeyModalViewDelegate <NSObject>
  21. @required
  22. - (void)didEndSecureInput:(NSInteger)type;
  23. @optional
  24. - (void)didEndSecureInputIgnoreInputLength:(NSInteger)type;
  25. - (void)TransKeyInputKey:(NSInteger)keytype;
  26. - (void)handleTapBehind:(TransKeyModalView *)view touchLocation:(CGPoint)location ;
  27. @end
  28. /*=============================================================================================================
  29. secureKeyboard interface
  30. =============================================================================================================*/
  31. @interface TransKeyModalView : UIViewController
  32. @property (nonatomic, assign) id<TransKeyModalViewDelegate> delegate;
  33. /*=============================================================================================================
  34. =============================================================================================================*/
  35. - (id)mTK_Init;
  36. /*=============================================================================================================
  37. type_ : (0 - , 1 - )
  38. crypt_ : (0 - , 1 - )
  39. bUpper_ : ( )
  40. language_ : (0 - , 1 - )
  41. =============================================================================================================*/
  42. - (void)SetSecureKeyboardType:(NSInteger)type_ crypt:(NSInteger)crypt_ isUpper:(BOOL)upper_ language:(NSInteger)language_;
  43. /*=============================================================================================================
  44. type_ : (0 - , 1 - )
  45. title_ : (, , )
  46. max_ : (:16) - 16 16
  47. min_ : (:0) -
  48. =============================================================================================================*/
  49. - (void)SetSecureFieldType:(NSInteger)type_ title:(NSString*)title_ maxLength:(NSInteger)max_ minLength:(NSInteger)min_;
  50. - (void)mTK_UseSequentialKey:(BOOL)bUse_;
  51. - (void)mTK_SetLabelFont:(UIColor*)txtColor_ font:(UIFont*)font_;
  52. - (void)mTK_SetHint:(NSString*)desc_ font:(UIFont*)font_;
  53. - (void)mTK_SetHint:(NSString*)desc_ font:(UIFont*)font_ textAlignment:(NSTextAlignment)alignment_;
  54. - (void)mTK_UseCursor:(BOOL)bUse_;
  55. - (void)mTK_UseAllDeleteButton:(BOOL)bUse_;
  56. - (void)mTK_ShowMessageIfMaxLength:(NSString*)message_;
  57. - (void)mTK_ShowMessageIfMinLength:(NSString*)message_;
  58. - (void)mTK_UseSpecialKey:(BOOL)bUse_ message:(NSString*)text_;
  59. - (void)mTK_SetInputEditboxImage:(BOOL)bUse_;
  60. /*=============================================================================================================
  61. API
  62. =============================================================================================================*/
  63. - (void)mTK_MakeSecureKey;
  64. - (void)mTK_SetSecureKey:(NSData*)key_;
  65. - (NSData*)mTK_GetSecureKey;
  66. - (NSInteger)mTK_GetDataLength;
  67. - (NSString*)mTK_GetCipherData;
  68. - (NSString*)mTK_GetCipherDataEx;
  69. - (NSString*)mTK_GetCipherDataExWithPadding;
  70. - (void)mTK_GetPlainDataWithKey:(NSData*)key_
  71. cipherString:(NSString*)cipherString_
  72. plainString:(char*)plainData_
  73. length:(NSInteger)length_;
  74. - (void)mTK_GetPlainDataExWithKey:(NSData*)key_
  75. cipherString:(NSString*)cipherString_
  76. plainString:(char*)plainData_
  77. length:(NSInteger)length_;
  78. - (void)mTK_GetPlainDataExWithPaddingWithKey:(NSData*)key_
  79. cipherString:(NSString*)cipherString_
  80. plainString:(char*)plainData_
  81. length:(NSInteger)length_;
  82. /*=============================================================================================================
  83. API
  84. =============================================================================================================*/
  85. - (NSString*)mTK_GetVersion;
  86. - (NSInteger)mTK_GetLanguage;
  87. - (NSString*)CK_GetSecureData;
  88. - (void)mTK_SetLabelBackColor:(UIColor*)labelBackColor;
  89. // VoiceOver 사용
  90. - (void)mTK_UseVoiceOver:(BOOL)bUse;
  91. // Navi Bar 설정
  92. - (void)mTK_UseNativeBackground;
  93. - (void)mTK_ShowNaviBar:(BOOL)show;
  94. - (void)mTK_SetEnableCancelButton:(BOOL)enable;
  95. - (void)mTK_SetDisableCancelButtonImageName:(NSString *)name;
  96. - (void)mTK_SetCancelButtonAccessibilityLabel:(NSString *)label;
  97. - (void)mTK_SetEnableCompleteButton:(BOOL)enable;
  98. - (void)mTK_SetDisableCompleteButtonImageName:(NSString *)name;
  99. - (void)mTK_SetCompleteButtonAccessibilityLabel:(NSString *)label;
  100. //입력필드 안보이게 처리
  101. - (void)mTK_SetSecureFieldHidden:(BOOL)hidden;
  102. - (void)mTK_UseShiftOptional:(BOOL)bUse;
  103. - (void)mTK_ClearDelegateSubviews;
  104. - (NSInteger)mTK_GetInputLength;
  105. - (void)mTK_EnableSamekeyInputDataEncrypt:(BOOL)bEnable;
  106. - (void)showModalViewAnimated:(BOOL)animated;
  107. - (void)hideModalView;
  108. - (void)mTK_SetModalPositionWithPosX:(CGFloat)PosX PosY:(CGFloat)PosY;
  109. - (void)mTK_SetPBKDF_RandKey:(NSData*)randkey;
  110. //라이선스 설정
  111. - (int) mTK_LicenseCheck : (NSString *) fileName;
  112. @end