UrlCrptyUtils.mm 576 B

123456789101112131415161718192021222324
  1. //
  2. // UrlCrptyUtils.m
  3. // UUTUtils
  4. //
  5. // Created by zhuge on 2018/1/23.
  6. // Copyright © 2018年 zhuge. All rights reserved.
  7. //
  8. #import "UrlCrptyUtils.h"
  9. #import "BulldogTool.h"
  10. @implementation UrlCrptyUtils
  11. + (NSString *)encrypt:(NSString *)content {
  12. string ret = BulldogTool::getInstance()->encrypt([content UTF8String]);
  13. return [NSString stringWithUTF8String:ret.c_str()];
  14. }
  15. + (NSString *)decrypt:(NSString *)content {
  16. string ret = BulldogTool::getInstance()->decrypt([content UTF8String]);
  17. return [NSString stringWithUTF8String:ret.c_str()];
  18. }
  19. @end