Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kelp404 committed Oct 26, 2013
1 parent fc128c5 commit c7fdcee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 208 deletions.
32 changes: 0 additions & 32 deletions CocoaSecurity/CocoaSecurity.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,18 @@
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
+ (CocoaSecurityResult *)aesEncryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;
- (CocoaSecurityResult *)aesEncrypt:(NSString *)data key:(NSString *)key;
- (CocoaSecurityResult *)aesEncrypt:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
- (CocoaSecurityResult *)aesEncrypt:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
- (CocoaSecurityResult *)aesEncryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;
#pragma mark AES Decrypt
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSString *)key;
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
+ (CocoaSecurityResult *)aesDecryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;
- (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSString *)key;
- (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
- (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
- (CocoaSecurityResult *)aesDecryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;

#pragma mark - MD5
+ (CocoaSecurityResult *)md5:(NSString *)hashString;
+ (CocoaSecurityResult *)md5WithData:(NSData *)hashData;
- (CocoaSecurityResult *)md5:(NSString *)hashString;
- (CocoaSecurityResult *)md5WithData:(NSData *)hashData;
#pragma mark HMAC-MD5
+ (CocoaSecurityResult *)hmacMd5:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacMd5WithData:(NSData *)hashData hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacMd5:(NSString *)hashString hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacMd5WithData:(NSData *)hashData hmacKey:(NSString *)key;

#pragma mark - SHA
+ (CocoaSecurityResult *)sha1:(NSString *)hashString;
Expand All @@ -69,16 +57,6 @@
+ (CocoaSecurityResult *)sha384WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha512:(NSString *)hashString;
+ (CocoaSecurityResult *)sha512WithData:(NSData *)hashData;
- (CocoaSecurityResult *)sha1:(NSString *)hashString;
- (CocoaSecurityResult *)sha1WithData:(NSData *)hashData;
- (CocoaSecurityResult *)sha224:(NSString *)hashString;
- (CocoaSecurityResult *)sha224WithData:(NSData *)hashData;
- (CocoaSecurityResult *)sha256:(NSString *)hashString;
- (CocoaSecurityResult *)sha256WithData:(NSData *)hashData;
- (CocoaSecurityResult *)sha384:(NSString *)hashString;
- (CocoaSecurityResult *)sha384WithData:(NSData *)hashData;
- (CocoaSecurityResult *)sha512:(NSString *)hashString;
- (CocoaSecurityResult *)sha512WithData:(NSData *)hashData;
#pragma mark HMAC-SHA
+ (CocoaSecurityResult *)hmacSha1:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha1WithData:(NSData *)hashData hmacKey:(NSString *)key;
Expand All @@ -90,16 +68,6 @@
+ (CocoaSecurityResult *)hmacSha384WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha512:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha512WithData:(NSData *)hashData hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha1:(NSString *)hashString hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha1WithData:(NSData *)hashData hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha224:(NSString *)hashString hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha224WithData:(NSData *)hashData hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha256:(NSString *)hashString hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha256WithData:(NSData *)hashData hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha384:(NSString *)hashString hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha384WithData:(NSData *)hashData hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha512:(NSString *)hashString hmacKey:(NSString *)key;
- (CocoaSecurityResult *)hmacSha512WithData:(NSData *)hashData hmacKey:(NSString *)key;
@end


Expand Down
Loading

0 comments on commit c7fdcee

Please sign in to comment.