pEpObjCAdapter/PEPPassphraseCache.m
author Dirk Zimmermann <dz@pep.security>
Thu, 25 Jun 2020 17:08:21 +0200
branchIOSAD-172
changeset 1456 752e8d0380a1
parent 1454 45299c4176f1
child 1457 98e4f0837759
permissions -rw-r--r--
IOSAD-172 Have an internal queue
     1 //
     2 //  PEPPassphraseCache.m
     3 //  pEpObjCAdapter
     4 //
     5 //  Created by Dirk Zimmermann on 25.06.20.
     6 //  Copyright © 2020 p≡p. All rights reserved.
     7 //
     8 
     9 #import "PEPPassphraseCache.h"
    10 
    11 @interface PEPPassphraseCache ()
    12 
    13 @property (nonatomic) dispatch_queue_t queue;
    14 
    15 @end
    16 
    17 @implementation PEPPassphraseCache
    18 
    19 /// Internal constructor (for now).
    20 - (instancetype)initTimeout:(NSUInteger)timeout
    21 {
    22     self = [super init];
    23     if (self) {
    24         _timeout = timeout;
    25         _queue = dispatch_queue_create("PEPPassphraseCache Queue", DISPATCH_QUEUE_SERIAL);
    26     }
    27     return self;
    28 }
    29 
    30 /// Public constructor with default values.
    31 - (instancetype)init
    32 {
    33     return [self initTimeout:10 * 60];
    34 }
    35 
    36 - (void)addPassphrase:(NSString *)passphrase
    37 {
    38 }
    39 
    40 - (NSArray *)passphrases
    41 {
    42     return @[];
    43 }
    44 
    45 @end