Files
MacPass/MacPassTests/KPKLegacyWritingTest.m
michael starke 450bc3d4dd Entropy is now calculated for Custom Alphabets in Password Generator View
Custom String in Password Generator View are now filtered to only include unique characters
2013-08-04 03:41:09 +02:00

37 lines
864 B
Objective-C

//
// KPKLegacyWritingTest.m
// MacPass
//
// Created by Michael Starke on 02.08.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "KPKLegacyWritingTest.h"
#import "KPKPassword.h"
#import "KPKTree+Serializing.h"
@implementation KPKLegacyWritingTest
- (void)setUp {
NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
NSURL *url = [myBundle URLForResource:@"Test_Password_1234" withExtension:@"kdb"];
_data = [NSData dataWithContentsOfURL:url];
_password = [[KPKPassword alloc] initWithPassword:@"1234" key:nil];
}
- (void)tearDown {
_data = nil;
_password = nil;
}
- (void)testWriting {
NSError *error = nil;
KPKTree *tree = [[KPKTree alloc] initWithData:_data password:_password error:&error];
NSData *data = [tree encryptWithPassword:_password forVersion:KPKVersion1 error:&error];
}
@end