2
0
MasterPassword/MasterPassword/MPElementGeneratedEntity.m
Maarten Billemont f622b2c7d4 iCloud fixes.
[UPDATED]   Moved shared MPAppDelegate code into separate files
            depending on the code's responsibility.
[UPDATED]   iCloud implementation removed in favor of
            iCloudStoreManager's managed implementation.
[FIXED]     iCloud configuration made AppStore friendly.
2012-05-07 22:32:10 +02:00

31 lines
667 B
Objective-C

//
// MPElementGeneratedEntity.m
// MasterPassword
//
// Created by Maarten Billemont on 16/01/12.
// Copyright (c) 2012 Lyndir. All rights reserved.
//
#import "MPElementGeneratedEntity.h"
#import "MPAppDelegate_Shared.h"
@implementation MPElementGeneratedEntity
@dynamic counter;
- (id)content {
if (!(self.type & MPElementTypeClassCalculated)) {
err(@"Corrupt element: %@, type: %d, does not match class: %@", self.name, self.type, [self class]);
return nil;
}
if (![self.name length])
return nil;
return MPCalculateContent((unsigned)self.type, self.name, [MPAppDelegate get].key, self.counter);
}
@end