NSData+Common.h 674 B

12345678910111213141516171819202122232425262728
  1. //
  2. // NSData+Common.h
  3. // CommonLibrary
  4. //
  5. // Created by Alexi on 13-11-6.
  6. // Copyright (c) 2013年 ywchen. All rights reserved.
  7. //
  8. //#if kSupportNSDataCommon
  9. #import <Foundation/Foundation.h>
  10. void *NewBase64Decode(const char *inputBuffer, size_t length, size_t *outputLength);
  11. char *NewBase64Encode(const void *inputBuffer, size_t length, bool separateLines, size_t *outputLength);
  12. @interface NSData (Common)
  13. @property (nonatomic, readonly) NSString* md5Hash;
  14. @property (nonatomic, readonly) NSString* sha1Hash;
  15. + (NSData *)dataFromBase64String:(NSString *)aString;
  16. - (NSString *)base64EncodedString;
  17. - (NSString *)md5Hash;
  18. - (NSString *)sha1Hash;
  19. @end
  20. //#endif