File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,11 @@ - (void)testTokenWithURLAndSecret
144
144
for (NSNumber *digitNumber in digitNumbers) {
145
145
for (NSNumber *periodNumber in periodNumbers) {
146
146
for (NSNumber *counterNumber in counterNumbers) {
147
- for (NSString *secondSecretString in secretStrings) {
148
147
// Construct the URL
149
148
NSMutableDictionary *query = [NSMutableDictionary dictionary ];
150
149
query[@" algorithm" ] = [NSString stringForAlgorithm: [algorithmNumber unsignedIntValue ]];
151
150
query[@" digits" ] = digitNumber;
152
- query[@" secret" ] = [[[secretString dataUsingEncoding: NSASCIIStringEncoding] base32String ] stringByReplacingOccurrencesOfString: @" = " withString: @" " ] ;
151
+ query[@" secret" ] = @" A " ;
153
152
query[@" period" ] = [periodNumber isEqual: kRandomKey ] ? @(arc4random ()%299 + 1 ) : periodNumber;
154
153
query[@" counter" ] = [counterNumber isEqual: kRandomKey ] ? @(arc4random () + ((uint64_t )arc4random () << 32 )) : counterNumber;
155
154
if (![issuer isEqual: [NSNull null ]])
@@ -163,7 +162,7 @@ - (void)testTokenWithURLAndSecret
163
162
urlComponents.percentEncodedQuery = [query queryString ];
164
163
165
164
// Create the token
166
- NSData *secret = [secondSecretString dataUsingEncoding: NSASCIIStringEncoding];
165
+ NSData *secret = [secretString dataUsingEncoding: NSASCIIStringEncoding];
167
166
OTPToken *token = [OTPToken tokenWithURL: [urlComponents URL ] secret: secret];
168
167
169
168
// Note: [OTPToken tokenWithURL:] will return nil if the token described by the URL is invalid.
@@ -197,7 +196,6 @@ - (void)testTokenWithURLAndSecret
197
196
}
198
197
}
199
198
}
200
- }
201
199
}
202
200
}
203
201
You can’t perform that action at this time.
0 commit comments