IOSAD-172 Password entry has isExpired IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Mon, 29 Jun 2020 16:39:43 +0200
branchIOSAD-172
changeset 1527d796df65faa7
parent 1526 2eb8c2525423
child 1528 32e6a448a551
IOSAD-172 Password entry has isExpired
pEpObjCAdapter/PEPPassphraseCacheEntry.h
pEpObjCAdapter/PEPPassphraseCacheEntry.m
     1.1 --- a/pEpObjCAdapter/PEPPassphraseCacheEntry.h	Mon Jun 29 16:39:43 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPPassphraseCacheEntry.h	Mon Jun 29 16:39:43 2020 +0200
     1.3 @@ -19,6 +19,10 @@
     1.4  
     1.5  - (instancetype)initWithPassphrase:(NSString *)passphrase;
     1.6  
     1.7 +/// @Return `YES` when the entry has expired (has passed the compiled-in timeout),
     1.8 +/// `NO` otherwise.
     1.9 +- (BOOL)isExpired;
    1.10 +
    1.11  @end
    1.12  
    1.13  NS_ASSUME_NONNULL_END
     2.1 --- a/pEpObjCAdapter/PEPPassphraseCacheEntry.m	Mon Jun 29 16:39:43 2020 +0200
     2.2 +++ b/pEpObjCAdapter/PEPPassphraseCacheEntry.m	Mon Jun 29 16:39:43 2020 +0200
     2.3 @@ -8,6 +8,8 @@
     2.4  
     2.5  #import "PEPPassphraseCacheEntry.h"
     2.6  
     2.7 +static NSTimeInterval s_defaultTimeoutInSeconds = 10 * 60;
     2.8 +
     2.9  @implementation PEPPassphraseCacheEntry
    2.10  
    2.11  - (instancetype)initWithPassphrase:(NSString *)passphrase
    2.12 @@ -20,4 +22,9 @@
    2.13      return self;
    2.14  }
    2.15  
    2.16 +- (BOOL)isExpired
    2.17 +{
    2.18 +    return NO;
    2.19 +}
    2.20 +
    2.21  @end