UnifyPayTool.h 933 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // UnifyPayTool.h
  3. // testDEMO
  4. //
  5. // Created by SunXP on 17/5/8.
  6. // Copyright © 2017年 L. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface UnifyPayTool : NSObject
  10. // 获取当前时间
  11. + (NSString *)getCurrentDate;
  12. // 根据订单前四位生成订单号
  13. + (NSString *)getOrderIDWithMsgSrcId:(NSString *)msgSrcId;
  14. // 生成支付物品详情
  15. + (NSString *)getGoodsDescription;
  16. // 数据签名
  17. + (NSString *)getSign:(NSDictionary *)dataDic MD5Key:(NSString *)MD5Key;
  18. // MD5加密算法
  19. + (NSString *)md5:(NSString *)str;
  20. // 数据SHA256签名
  21. + (NSString *)getSHA256Sign:(NSDictionary *)dataDic MD5Key:(NSString *)MD5Key;
  22. //SHA256 加密算法
  23. + (NSString *)SHA256WithString:(NSString *)inputString;
  24. // 添加菊花
  25. + (void)showHUD:(UIView *)targetView animated:(BOOL)animated;
  26. // 隐藏菊花
  27. + (void)hideHUD:(UIView *)targetView animated:(BOOL)animated;
  28. // 获取设备UUID
  29. + (NSString *)getUUID;
  30. @end