NSData+Base32.h 757 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // MF_Base32Additions.h
  3. // Base32 -- RFC 4648 compatible implementation
  4. // see http://www.ietf.org/rfc/rfc4648.txt for more details
  5. //
  6. // Designed to be compiled with Automatic Reference Counting
  7. //
  8. // Created by Dave Poirier on 12-06-14.
  9. // Public Domain
  10. //
  11. #import <Foundation/Foundation.h>
  12. #define NSBase32StringEncoding 0x4D467E32
  13. @interface NSString (Base32Addition)
  14. +(NSString *)stringFromBase32String:(NSString *)base32String;
  15. -(NSString *)base32String;
  16. @end
  17. @interface NSData (Base32Addition)
  18. +(NSData *)dataWithBase32String:(NSString *)base32String;
  19. -(NSString *)base32String;
  20. @end
  21. @interface MF_Base32Codec : NSObject
  22. +(NSData *)dataFromBase32String:(NSString *)base32String;
  23. +(NSString *)base32StringFromData:(NSData *)data;
  24. @end