IOSAD-172 Rename files to reflect passphrase naming IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Thu, 25 Jun 2020 17:08:21 +0200
branchIOSAD-172
changeset 1449bf378dcc639a
parent 1448 827adca1512d
child 1450 02d7ef1f360b
IOSAD-172 Rename files to reflect passphrase naming
pEpObjCAdapter.xcodeproj/project.pbxproj
pEpObjCAdapter/PEPPassphraseCache.h
pEpObjCAdapter/PEPPassphraseCache.m
pEpObjCAdapter/PEPPasswordCache.h
pEpObjCAdapter/PEPPasswordCache.m
pEpObjCTests/PEPPassphraseCacheTest.m
pEpObjCTests/PEPPasswordCacheTest.m
     1.1 --- a/pEpObjCAdapter.xcodeproj/project.pbxproj	Thu Jun 25 17:08:21 2020 +0200
     1.2 +++ b/pEpObjCAdapter.xcodeproj/project.pbxproj	Thu Jun 25 17:08:21 2020 +0200
     1.3 @@ -24,9 +24,9 @@
     1.4  		4331CE94229C2AAF00DDDC65 /* PEPSizeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4331CE93229C2AAF00DDDC65 /* PEPSizeTest.m */; };
     1.5  		4336853F203D5CE60069A451 /* PEPTestUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 15D3D77C2010DDC500A0DA20 /* PEPTestUtils.m */; };
     1.6  		434226811D4F60000083ED79 /* PepTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 434226801D4F60000083ED79 /* PepTests.m */; };
     1.7 -		43589EF724A4A3B70079BEA2 /* PEPPasswordCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 43589EF524A4A3B70079BEA2 /* PEPPasswordCache.h */; };
     1.8 -		43589EF924A4A3B70079BEA2 /* PEPPasswordCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 43589EF624A4A3B70079BEA2 /* PEPPasswordCache.m */; };
     1.9 -		43589EFB24A4ACFC0079BEA2 /* PEPPasswordCacheTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 43589EFA24A4ACFC0079BEA2 /* PEPPasswordCacheTest.m */; };
    1.10 +		43589EF724A4A3B70079BEA2 /* PEPPassphraseCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 43589EF524A4A3B70079BEA2 /* PEPPassphraseCache.h */; };
    1.11 +		43589EF924A4A3B70079BEA2 /* PEPPassphraseCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 43589EF624A4A3B70079BEA2 /* PEPPassphraseCache.m */; };
    1.12 +		43589EFB24A4ACFC0079BEA2 /* PEPPassphraseCacheTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 43589EFA24A4ACFC0079BEA2 /* PEPPassphraseCacheTest.m */; };
    1.13  		435C0C8C22291FFB0025C6B5 /* PEPSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 15206CC51F8E078B003FF880 /* PEPSession.h */; settings = {ATTRIBUTES = (Public, ); }; };
    1.14  		435C0C9922292C080025C6B5 /* PEPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 435796E11FB5E51A00395A9E /* PEPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; };
    1.15  		435C0CA222292E7C0025C6B5 /* PEPTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 435C0CA022292E7C0025C6B5 /* PEPTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
    1.16 @@ -176,9 +176,9 @@
    1.17  		435665CB2080A6CB00EC5B10 /* NSNumber+PEPRating.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+PEPRating.m"; sourceTree = "<group>"; };
    1.18  		435796E11FB5E51A00395A9E /* PEPMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPMessage.h; sourceTree = "<group>"; };
    1.19  		435796E21FB5E51A00395A9E /* PEPMessage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPMessage.m; sourceTree = "<group>"; };
    1.20 -		43589EF524A4A3B70079BEA2 /* PEPPasswordCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPPasswordCache.h; sourceTree = "<group>"; };
    1.21 -		43589EF624A4A3B70079BEA2 /* PEPPasswordCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPPasswordCache.m; sourceTree = "<group>"; };
    1.22 -		43589EFA24A4ACFC0079BEA2 /* PEPPasswordCacheTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPPasswordCacheTest.m; sourceTree = "<group>"; };
    1.23 +		43589EF524A4A3B70079BEA2 /* PEPPassphraseCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPPassphraseCache.h; sourceTree = "<group>"; };
    1.24 +		43589EF624A4A3B70079BEA2 /* PEPPassphraseCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPPassphraseCache.m; sourceTree = "<group>"; };
    1.25 +		43589EFA24A4ACFC0079BEA2 /* PEPPassphraseCacheTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPPassphraseCacheTest.m; sourceTree = "<group>"; };
    1.26  		435C0CA022292E7C0025C6B5 /* PEPTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PEPTypes.h; path = PEPObjCAdapterFramework/PEPTypes.h; sourceTree = SOURCE_ROOT; };
    1.27  		435C0CAA222930340025C6B5 /* PEPConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPConstants.h; sourceTree = "<group>"; };
    1.28  		435C0CAB222930340025C6B5 /* PEPConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPConstants.m; sourceTree = "<group>"; };
    1.29 @@ -359,8 +359,8 @@
    1.30  				430CD9BF2292B1EA00AAC37F /* PEPSync_Internal.h */,
    1.31  				43AD0E2E22E99ECE00D46F56 /* PEPInternalConstants.h */,
    1.32  				43AD0E2F22E99ECE00D46F56 /* PEPInternalConstants.m */,
    1.33 -				43589EF524A4A3B70079BEA2 /* PEPPasswordCache.h */,
    1.34 -				43589EF624A4A3B70079BEA2 /* PEPPasswordCache.m */,
    1.35 +				43589EF524A4A3B70079BEA2 /* PEPPassphraseCache.h */,
    1.36 +				43589EF624A4A3B70079BEA2 /* PEPPassphraseCache.m */,
    1.37  			);
    1.38  			path = pEpObjCAdapter;
    1.39  			sourceTree = "<group>";
    1.40 @@ -419,7 +419,7 @@
    1.41  				152A9C462010F50400F962ED /* PEPSessionTest.m */,
    1.42  				64415E1B1BE94FCB00F6CBB2 /* Info.plist */,
    1.43  				4331CE93229C2AAF00DDDC65 /* PEPSizeTest.m */,
    1.44 -				43589EFA24A4ACFC0079BEA2 /* PEPPasswordCacheTest.m */,
    1.45 +				43589EFA24A4ACFC0079BEA2 /* PEPPassphraseCacheTest.m */,
    1.46  			);
    1.47  			path = pEpObjCTests;
    1.48  			sourceTree = "<group>";
    1.49 @@ -435,7 +435,7 @@
    1.50  				4360AA0E2227F22900E62E5A /* PEPObjCAdapter.h in Headers */,
    1.51  				430CD9BB2292AEDD00AAC37F /* PEPNotifyHandshakeDelegate.h in Headers */,
    1.52  				435C0C9922292C080025C6B5 /* PEPMessage.h in Headers */,
    1.53 -				43589EF724A4A3B70079BEA2 /* PEPPasswordCache.h in Headers */,
    1.54 +				43589EF724A4A3B70079BEA2 /* PEPPassphraseCache.h in Headers */,
    1.55  				435C0CA222292E7C0025C6B5 /* PEPTypes.h in Headers */,
    1.56  				435F5164222045FB006EB11F /* PEPIdentity.h in Headers */,
    1.57  				43AD0E3022E99ECE00D46F56 /* PEPInternalConstants.h in Headers */,
    1.58 @@ -639,7 +639,7 @@
    1.59  				435F5179222046C2006EB11F /* NSNumber+PEPRating.m in Sources */,
    1.60  				435F516B222046C2006EB11F /* PEPMessageUtil.m in Sources */,
    1.61  				435F5171222046C2006EB11F /* PEPCopyableThread.m in Sources */,
    1.62 -				43589EF924A4A3B70079BEA2 /* PEPPasswordCache.m in Sources */,
    1.63 +				43589EF924A4A3B70079BEA2 /* PEPPassphraseCache.m in Sources */,
    1.64  				435F5175222046C2006EB11F /* PEPMessage.m in Sources */,
    1.65  				435F5174222046C2006EB11F /* PEPIdentity.m in Sources */,
    1.66  				435F517A222046C2006EB11F /* NSObject+Extension.m in Sources */,
    1.67 @@ -661,7 +661,7 @@
    1.68  				4336853F203D5CE60069A451 /* PEPTestUtils.m in Sources */,
    1.69  				4396CEB82187196600FDD398 /* PEPSessionTestNotifyHandshakeDelegate.m in Sources */,
    1.70  				15D3D761200F61BB00A0DA20 /* PEPSessionProviderTest.m in Sources */,
    1.71 -				43589EFB24A4ACFC0079BEA2 /* PEPPasswordCacheTest.m in Sources */,
    1.72 +				43589EFB24A4ACFC0079BEA2 /* PEPPassphraseCacheTest.m in Sources */,
    1.73  			);
    1.74  			runOnlyForDeploymentPostprocessing = 0;
    1.75  		};
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/pEpObjCAdapter/PEPPassphraseCache.h	Thu Jun 25 17:08:21 2020 +0200
     2.3 @@ -0,0 +1,26 @@
     2.4 +//
     2.5 +//  PEPPassphraseCache.h
     2.6 +//  pEpObjCAdapter
     2.7 +//
     2.8 +//  Created by Dirk Zimmermann on 25.06.20.
     2.9 +//  Copyright © 2020 p≡p. All rights reserved.
    2.10 +//
    2.11 +
    2.12 +#import <Foundation/Foundation.h>
    2.13 +
    2.14 +NS_ASSUME_NONNULL_BEGIN
    2.15 +
    2.16 +@interface PEPPassphraseCache : NSObject
    2.17 +
    2.18 +/// Timeout of passwords in seconds, the default being 10 minutes.
    2.19 +@property (nonatomic) NSUInteger timeout;
    2.20 +
    2.21 +/// Add a new password.
    2.22 +- (void)addPassphrase:(NSString *)passphrase;
    2.23 +
    2.24 +/// Retrieve the current list of cached passwords, including the empty one.
    2.25 +- (NSArray *)passphrases;
    2.26 +
    2.27 +@end
    2.28 +
    2.29 +NS_ASSUME_NONNULL_END
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/pEpObjCAdapter/PEPPassphraseCache.m	Thu Jun 25 17:08:21 2020 +0200
     3.3 @@ -0,0 +1,38 @@
     3.4 +//
     3.5 +//  PEPPassphraseCache.m
     3.6 +//  pEpObjCAdapter
     3.7 +//
     3.8 +//  Created by Dirk Zimmermann on 25.06.20.
     3.9 +//  Copyright © 2020 p≡p. All rights reserved.
    3.10 +//
    3.11 +
    3.12 +#import "PEPPassphraseCache.h"
    3.13 +
    3.14 +@implementation PEPPassphraseCache
    3.15 +
    3.16 +/// Internal constructor (for now).
    3.17 +- (instancetype)initTimeout:(NSUInteger)timeout
    3.18 +{
    3.19 +    self = [super init];
    3.20 +    if (self) {
    3.21 +        _timeout = timeout;
    3.22 +    }
    3.23 +    return self;
    3.24 +}
    3.25 +
    3.26 +/// Public constructor with default values.
    3.27 +- (instancetype)init
    3.28 +{
    3.29 +    return [self initTimeout:10 * 60];
    3.30 +}
    3.31 +
    3.32 +- (void)addPassphrase:(NSString *)passphrase
    3.33 +{
    3.34 +}
    3.35 +
    3.36 +- (NSArray *)passphrases
    3.37 +{
    3.38 +    return @[];
    3.39 +}
    3.40 +
    3.41 +@end
     4.1 --- a/pEpObjCAdapter/PEPPasswordCache.h	Thu Jun 25 17:08:21 2020 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,26 +0,0 @@
     4.4 -//
     4.5 -//  PEPPasswordCache.h
     4.6 -//  pEpObjCAdapter
     4.7 -//
     4.8 -//  Created by Dirk Zimmermann on 25.06.20.
     4.9 -//  Copyright © 2020 p≡p. All rights reserved.
    4.10 -//
    4.11 -
    4.12 -#import <Foundation/Foundation.h>
    4.13 -
    4.14 -NS_ASSUME_NONNULL_BEGIN
    4.15 -
    4.16 -@interface PEPPasswordCache : NSObject
    4.17 -
    4.18 -/// Timeout of passwords in seconds, the default being 10 minutes.
    4.19 -@property (nonatomic) NSUInteger timeout;
    4.20 -
    4.21 -/// Add a new password.
    4.22 -- (void)addPassphrase:(NSString *)passphrase;
    4.23 -
    4.24 -/// Retrieve the current list of cached passwords, including the empty one.
    4.25 -- (NSArray *)passphrases;
    4.26 -
    4.27 -@end
    4.28 -
    4.29 -NS_ASSUME_NONNULL_END
     5.1 --- a/pEpObjCAdapter/PEPPasswordCache.m	Thu Jun 25 17:08:21 2020 +0200
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,38 +0,0 @@
     5.4 -//
     5.5 -//  PEPPasswordCache.m
     5.6 -//  pEpObjCAdapter
     5.7 -//
     5.8 -//  Created by Dirk Zimmermann on 25.06.20.
     5.9 -//  Copyright © 2020 p≡p. All rights reserved.
    5.10 -//
    5.11 -
    5.12 -#import "PEPPasswordCache.h"
    5.13 -
    5.14 -@implementation PEPPasswordCache
    5.15 -
    5.16 -/// Internal constructor (for now).
    5.17 -- (instancetype)initTimeout:(NSUInteger)timeout
    5.18 -{
    5.19 -    self = [super init];
    5.20 -    if (self) {
    5.21 -        _timeout = timeout;
    5.22 -    }
    5.23 -    return self;
    5.24 -}
    5.25 -
    5.26 -/// Public constructor with default values.
    5.27 -- (instancetype)init
    5.28 -{
    5.29 -    return [self initTimeout:10 * 60];
    5.30 -}
    5.31 -
    5.32 -- (void)addPassphrase:(NSString *)passphrase
    5.33 -{
    5.34 -}
    5.35 -
    5.36 -- (NSArray *)passphrases
    5.37 -{
    5.38 -    return @[];
    5.39 -}
    5.40 -
    5.41 -@end
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/pEpObjCTests/PEPPassphraseCacheTest.m	Thu Jun 25 17:08:21 2020 +0200
     6.3 @@ -0,0 +1,40 @@
     6.4 +//
     6.5 +//  PEPPassphraseCacheTest.m
     6.6 +//  pEpObjCAdapterTests
     6.7 +//
     6.8 +//  Created by Dirk Zimmermann on 25.06.20.
     6.9 +//  Copyright © 2020 p≡p. All rights reserved.
    6.10 +//
    6.11 +
    6.12 +#import <XCTest/XCTest.h>
    6.13 +
    6.14 +#import "PEPPassphraseCache.h"
    6.15 +
    6.16 +@interface PEPPasswordCacheTest : XCTestCase
    6.17 +
    6.18 +@property (nonatomic) PEPPasswordCache *cache;
    6.19 +
    6.20 +@end
    6.21 +
    6.22 +@implementation PEPPassphraseCacheTest
    6.23 +
    6.24 +- (void)setUp
    6.25 +{
    6.26 +    self.cache = [[PEPPasswordCache alloc] init];
    6.27 +}
    6.28 +
    6.29 +- (void)testContainsEmptyPassphrase
    6.30 +{
    6.31 +    XCTAssertEqual(self.cache.passphrases.count, 1);
    6.32 +    XCTAssertEqualObjects(self.cache.passphrases, @[@""]);
    6.33 +}
    6.34 +
    6.35 +- (void)testContainsSetPassphrase
    6.36 +{
    6.37 +    NSString *passphrase = @"somepass";
    6.38 +    [self.cache addPassphrase:passphrase];
    6.39 +    XCTAssertEqual(self.cache.passphrases.count, 2);
    6.40 +    XCTAssertEqualObjects(self.cache.passphrases, @[@""]);
    6.41 +}
    6.42 +
    6.43 +@end
     7.1 --- a/pEpObjCTests/PEPPasswordCacheTest.m	Thu Jun 25 17:08:21 2020 +0200
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,40 +0,0 @@
     7.4 -//
     7.5 -//  PEPPasswordCacheTest.m
     7.6 -//  pEpObjCAdapterTests
     7.7 -//
     7.8 -//  Created by Dirk Zimmermann on 25.06.20.
     7.9 -//  Copyright © 2020 p≡p. All rights reserved.
    7.10 -//
    7.11 -
    7.12 -#import <XCTest/XCTest.h>
    7.13 -
    7.14 -#import "PEPPasswordCache.h"
    7.15 -
    7.16 -@interface PEPPasswordCacheTest : XCTestCase
    7.17 -
    7.18 -@property (nonatomic) PEPPasswordCache *cache;
    7.19 -
    7.20 -@end
    7.21 -
    7.22 -@implementation PEPPasswordCacheTest
    7.23 -
    7.24 -- (void)setUp
    7.25 -{
    7.26 -    self.cache = [[PEPPasswordCache alloc] init];
    7.27 -}
    7.28 -
    7.29 -- (void)testContainsEmptyPassphrase
    7.30 -{
    7.31 -    XCTAssertEqual(self.cache.passphrases.count, 1);
    7.32 -    XCTAssertEqualObjects(self.cache.passphrases, @[@""]);
    7.33 -}
    7.34 -
    7.35 -- (void)testContainsSetPassphrase
    7.36 -{
    7.37 -    NSString *passphrase = @"somepass";
    7.38 -    [self.cache addPassphrase:passphrase];
    7.39 -    XCTAssertEqual(self.cache.passphrases.count, 2);
    7.40 -    XCTAssertEqualObjects(self.cache.passphrases, @[@""]);
    7.41 -}
    7.42 -
    7.43 -@end