@@ -273,14 +273,12 @@ - (nullable NSData *)decryptWithDHKey:(OpaqueKey *)dhKey {
273273}
274274
275275- (nullable NSData *)encapsulatedDHDecryptionWithKeys : (NSArray <NSValue *> *)keys usingIVSize : (NSUInteger )ivSize {
276- NoTimeLog (@" encapsulatedDHDecryptionWithKeys: %lu using: %lu " , keys.count , ivSize);
277276 NSAssert (keys.count > 1 , @" There should be at least two key (first pair)" );
278277 if ([keys count ] < 2 ) return self;
279278
280279 OpaqueKey *firstKey = (OpaqueKey *)[keys firstObject ].pointerValue ;
281280 OpaqueKey *secondKey = (OpaqueKey *)[keys objectAtIndex: 1 ].pointerValue ;
282281 NSData *encryptedData = [self decryptWithSecretKey: secondKey fromPublicKey: firstKey usingIVSize: ivSize];
283- NoTimeLog (@" encapsulatedDHEncryptionWithKeys: encrypted: %@ " , encryptedData.hexString );
284282 if (keys.count == 2 ) { // not really necessary but easier to read
285283 return encryptedData;
286284 } else {
@@ -289,12 +287,10 @@ - (nullable NSData *)encapsulatedDHDecryptionWithKeys:(NSArray<NSValue *> *)keys
289287}
290288
291289- (nullable NSData *)encapsulatedDHDecryptionWithKeys : (NSArray <NSValue *> *)keys {
292- NoTimeLog (@" encapsulatedDHDecryptionWithKeys: %lu " , keys.count );
293290 NSAssert (keys.count > 0 , @" There should be at least one key" );
294291 if (![keys count ]) return self;
295292 OpaqueKey *firstKey = (OpaqueKey *) [keys firstObject ].pointerValue ;
296293 NSData *encryptedData = [self decryptWithDHKey: firstKey];
297- NoTimeLog (@" encapsulatedDHDecryptionWithKeys: decrypted: %@ " , encryptedData.hexString );
298294 if (keys.count == 1 ) { // not really necessary but easier to read
299295 return encryptedData;
300296 } else {
@@ -303,12 +299,10 @@ - (nullable NSData *)encapsulatedDHDecryptionWithKeys:(NSArray<NSValue *> *)keys
303299}
304300
305301- (nullable NSData *)encapsulatedDHEncryptionWithKeys : (NSArray <NSValue *> *)keys {
306- NoTimeLog (@" encapsulatedDHEncryptionWithKeys: %lu " , keys.count );
307302 NSAssert (keys.count > 0 , @" There should be at least one key" );
308303 if (![keys count ]) return self;
309304 OpaqueKey *firstKey = (OpaqueKey *) [keys firstObject ].pointerValue ;
310305 NSData *encryptedData = [self encryptWithDHKey: firstKey];
311- NoTimeLog (@" encapsulatedDHEncryptionWithKeys: encrypted: %@ " , encryptedData.hexString );
312306 if (keys.count == 1 ) { // not really necessary but easier to read
313307 return encryptedData;
314308 } else {
@@ -317,15 +311,13 @@ - (nullable NSData *)encapsulatedDHEncryptionWithKeys:(NSArray<NSValue *> *)keys
317311}
318312
319313- (nullable NSData *)encapsulatedDHEncryptionWithKeys : (NSArray <NSValue *> *)keys usingInitializationVector : (NSData *)initializationVector {
320- NoTimeLog (@" encapsulatedDHEncryptionWithKeys: %lu using: %@ " , keys.count , initializationVector.hexString );
321314 NSAssert (keys.count > 1 , @" There should be at least two key (first pair)" );
322315 if ([keys count ] < 2 ) return self;
323316
324317 OpaqueKey *firstKey = (OpaqueKey *) [keys firstObject ].pointerValue ;
325318 OpaqueKey *secondKey = (OpaqueKey *) [keys objectAtIndex: 1 ].pointerValue ;
326319
327320 NSData *encryptedData = [self encryptWithSecretKey: firstKey forPublicKey: secondKey usingInitializationVector: initializationVector];
328- NoTimeLog (@" encapsulatedDHEncryptionWithKeys: encrypted: %@ " , encryptedData.hexString );
329321 if (keys.count == 2 ) { // not really necessary but easier to read
330322 return encryptedData;
331323 } else {
0 commit comments