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
This commit is contained in:
michael starke
2013-08-04 03:41:09 +02:00
parent 9d22494bf4
commit 450bc3d4dd
20 changed files with 902 additions and 279 deletions

View File

@@ -7,10 +7,9 @@
//
#import "KPKXmlLoadingTest.h"
#import "KPKTreeCryptor.h"
#import "KPKPassword.h"
#import "KPKTree.h"
#import "KPKTree+Serializing.h"
#import "KPKEntry.h"
#import "KPKGroup.h"
@@ -29,12 +28,12 @@
}
- (void)testLoading {
KPKTreeCryptor *cryptor = [KPKTreeCryptor treeCryptorWithData:_data password:_password];
KPKTree *tree = [cryptor decryptTree:NULL];
//STAssertNotNil(tree, @"Loading should result in a tree object");
NSError *error;
KPKTree *tree = [[KPKTree alloc] initWithData:_data password:_password error:&error];
STAssertNotNil(tree, @"Loading should result in a tree object");
//STAssertTrue([tree.root.groups count] == 0, @"Tree contains just root group");
//STAssertTrue([tree.root.entries count] == 1, @"Tree has only one entry");
STAssertTrue([tree.root.groups count] == 0, @"Tree contains just root group");
STAssertTrue([tree.root.entries count] == 1, @"Tree has only one entry");
KPKEntry *entry = [tree.root.entries lastObject];
NSMutableData *data = [[NSMutableData alloc] init];