Skip to content

Commit 2054029

Browse files
committed
Switched to Foundations Base 64 encoding.
1 parent da12b42 commit 2054029

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ which shows all of the inter-app hooks in action.
284284
## Dependencies
285285

286286
* [JXHTTP](https://github.com/jstn/JXHTTP)
287-
* [NSData+Base64](https://github.com/l4u/NSData-Base64)
288287

289288
## Contact
290289

TMTumblrSDK.podspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'TMTumblrSDK'
3-
s.version = '1.0.4'
3+
s.version = '1.0.5'
44
s.summary = 'An unopinionated and flexible library for easily integrating Tumblr data into your iOS or OS X application.'
55
s.author = { 'Bryan Irace' => '[email protected]' }
66
s.homepage = 'http://tumblr.github.com/TMTumblrSDK'
@@ -54,7 +54,6 @@ Pod::Spec.new do |s|
5454

5555
ss.subspec 'Authentication' do |sss|
5656
sss.source_files = 'TMTumblrSDK/Authentication'
57-
sss.dependency 'NSData+Base64', '1.0'
5857
sss.dependency 'TMTumblrSDK/Core'
5958
end
6059
end

TMTumblrSDK/Authentication/TMOAuth.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#import <CommonCrypto/CommonDigest.h>
1212
#import <CommonCrypto/CommonHMAC.h>
1313
#import <sys/sysctl.h>
14-
#import "NSData+Base64.h"
1514
#import "TMSDKFunctions.h"
1615

1716
@interface TMOAuth()
@@ -90,7 +89,10 @@ - (id)initWithURL:(NSURL *)URL method:(NSString *)method postParameters:(NSDicti
9089
NSString *sign(NSString *baseString, NSString *consumerSecret, NSString *tokenSecret) {
9190
NSString *keyString = [NSString stringWithFormat:@"%@&%@", consumerSecret, tokenSecret ? tokenSecret : @""];
9291

93-
return [HMACSHA1(baseString, keyString) base64EncodedString];
92+
NSData *hashedData = HMACSHA1(baseString, keyString);
93+
NSString *base64EncodedString = [hashedData base64EncodedStringWithOptions:0];
94+
95+
return base64EncodedString;
9496
}
9597

9698
NSString *UNIXTimestamp(NSDate *date) {

0 commit comments

Comments
 (0)