mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 01:12:31 +00:00
Updated KeePassKit submodule
Added save to Kdbx test
This commit is contained in:
Submodule KeePassKit updated: 88e6f34a06...1c450910be
@@ -247,6 +247,7 @@
|
||||
4CB4AA0D17C2274200454CAD /* KeePass1_native_test.kdb in Resources */ = {isa = PBXBuildFile; fileRef = 4CB4AA0C17C2274200454CAD /* KeePass1_native_test.kdb */; };
|
||||
4CB9339916D3A0DD00A13B5D /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4CB9339716D3A0DD00A13B5D /* Credits.rtf */; };
|
||||
4CBA2ABA17074C07006D8139 /* MPSettingsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */; };
|
||||
4CBA561617C2EA4900CE13D3 /* KPKTestXmlWriting.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA561517C2EA4900CE13D3 /* KPKTestXmlWriting.m */; };
|
||||
4CC0D2CE17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC0D2CD17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m */; };
|
||||
4CC0D2D117974A5A000B4BDA /* MPAttachmentTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC0D2D017974A5A000B4BDA /* MPAttachmentTableViewDelegate.m */; };
|
||||
4CC1AEBE16D4467C006D2AAB /* KdbTree+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */; };
|
||||
@@ -756,6 +757,8 @@
|
||||
4CB9339816D3A0DD00A13B5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
|
||||
4CBA2AB617074B59006D8139 /* MPSettingsHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSettingsHelper.h; sourceTree = "<group>"; };
|
||||
4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSettingsHelper.m; sourceTree = "<group>"; };
|
||||
4CBA561417C2EA4900CE13D3 /* KPKTestXmlWriting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTestXmlWriting.h; sourceTree = "<group>"; };
|
||||
4CBA561517C2EA4900CE13D3 /* KPKTestXmlWriting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTestXmlWriting.m; sourceTree = "<group>"; };
|
||||
4CC0D2CC17974A47000B4BDA /* MPCustomFieldTableViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCustomFieldTableViewDelegate.h; sourceTree = "<group>"; };
|
||||
4CC0D2CD17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCustomFieldTableViewDelegate.m; sourceTree = "<group>"; };
|
||||
4CC0D2CF17974A5A000B4BDA /* MPAttachmentTableViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAttachmentTableViewDelegate.h; sourceTree = "<group>"; };
|
||||
@@ -1302,6 +1305,8 @@
|
||||
4CEAF85A17BA9B44001307A6 /* KPKTestKeyfileParsing.m */,
|
||||
4C6FDD1F17BC4F4C004AEEC8 /* KPKTestPlaceholder.h */,
|
||||
4C6FDD2017BC4F4C004AEEC8 /* KPKTestPlaceholder.m */,
|
||||
4CBA561417C2EA4900CE13D3 /* KPKTestXmlWriting.h */,
|
||||
4CBA561517C2EA4900CE13D3 /* KPKTestXmlWriting.m */,
|
||||
);
|
||||
path = MacPassTests;
|
||||
sourceTree = "<group>";
|
||||
@@ -2062,6 +2067,7 @@
|
||||
4CE76DAD17B3AD010043B82B /* KPKHashedDataTest.m in Sources */,
|
||||
4CEAF85B17BA9B44001307A6 /* KPKTestKeyfileParsing.m in Sources */,
|
||||
4C6FDD2117BC4F4C004AEEC8 /* KPKTestPlaceholder.m in Sources */,
|
||||
4CBA561617C2EA4900CE13D3 /* KPKTestXmlWriting.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
13
MacPassTests/KPKTestXmlWriting.h
Normal file
13
MacPassTests/KPKTestXmlWriting.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// KPKTestXmlWriting.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 20.08.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <SenTestingKit/SenTestingKit.h>
|
||||
|
||||
@interface KPKTestXmlWriting : SenTestCase
|
||||
|
||||
@end
|
||||
31
MacPassTests/KPKTestXmlWriting.m
Normal file
31
MacPassTests/KPKTestXmlWriting.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// KPKTestXmlWriting.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 20.08.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KPKTestXmlWriting.h"
|
||||
#import "KPKPassword.h"
|
||||
#import "KPKTree+Serializing.h"
|
||||
|
||||
@implementation KPKTestXmlWriting
|
||||
|
||||
- (void)testXmlWriting {
|
||||
NSData *data = [self _loadTestDataBase:@"CustomIcon_Password_1234" extension:@"kdbx"];
|
||||
NSError *error;
|
||||
KPKPassword *password = [[KPKPassword alloc] initWithPassword:@"1234" key:nil];
|
||||
KPKTree *tree = [[KPKTree alloc] initWithData:data password:password error:&error];
|
||||
error = nil;
|
||||
NSData *saveData = [tree encryptWithPassword:password forVersion:KPKXmlVersion error:&error];
|
||||
//[saveData writeToFile:@"CustomIcon_Password_1234_save.kdbx" atomically:YES];
|
||||
}
|
||||
|
||||
- (NSData *)_loadTestDataBase:(NSString *)name extension:(NSString *)extension {
|
||||
NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
|
||||
NSURL *url = [myBundle URLForResource:name withExtension:extension];
|
||||
return [NSData dataWithContentsOfURL:url];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user