IOSAD-172 Rename max number of passphrases IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Fri, 26 Jun 2020 16:54:34 +0200
branchIOSAD-172
changeset 14604cacc1f773c4
parent 1459 a2d09a38d424
child 1461 c7790f7d9185
IOSAD-172 Rename max number of passphrases
pEpObjCAdapter/PEPPassphraseCache.m
     1.1 --- a/pEpObjCAdapter/PEPPassphraseCache.m	Fri Jun 26 16:54:34 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPPassphraseCache.m	Fri Jun 26 16:54:34 2020 +0200
     1.3 @@ -8,7 +8,7 @@
     1.4  
     1.5  #import "PEPPassphraseCache.h"
     1.6  
     1.7 -static NSUInteger s_numberOfPassphrases = 20;
     1.8 +static NSUInteger s_maxNumberOfPassphrases = 20;
     1.9  
    1.10  @interface PEPPassphraseCache ()
    1.11  
    1.12 @@ -26,7 +26,7 @@
    1.13      if (self) {
    1.14          _timeout = timeout;
    1.15          _queue = dispatch_queue_create("PEPPassphraseCache Queue", DISPATCH_QUEUE_SERIAL);
    1.16 -        _mutablePassphrases = [NSMutableArray arrayWithCapacity:s_numberOfPassphrases];
    1.17 +        _mutablePassphrases = [NSMutableArray arrayWithCapacity:s_maxNumberOfPassphrases];
    1.18      }
    1.19      return self;
    1.20  }
    1.21 @@ -41,7 +41,7 @@
    1.22  {
    1.23      dispatch_sync(self.queue, ^{
    1.24          [self.mutablePassphrases addObject:passphrase];
    1.25 -        if (self.mutablePassphrases.count > s_numberOfPassphrases) {
    1.26 +        if (self.mutablePassphrases.count > s_maxNumberOfPassphrases) {
    1.27              [self.mutablePassphrases removeObjectAtIndex:0];
    1.28          }
    1.29      });
    1.30 @@ -50,7 +50,7 @@
    1.31  - (NSArray *)passphrases
    1.32  {
    1.33      NSMutableArray *resultingPassphrases = [NSMutableArray
    1.34 -                                            arrayWithCapacity:s_numberOfPassphrases + 1];
    1.35 +                                            arrayWithCapacity:s_maxNumberOfPassphrases + 1];
    1.36      [resultingPassphrases addObject:@""];
    1.37      dispatch_sync(self.queue, ^{
    1.38          for (NSString *passphrase in self.mutablePassphrases) {