Added support to save and load Attachemnts on KeePass2 Databases.

Support for Keepass1 DBs is still missing
This commit is contained in:
michael starke
2013-07-05 20:09:17 +02:00
parent 7feb2517dd
commit 9c3a62bef6
14 changed files with 272 additions and 94 deletions

View File

@@ -57,10 +57,6 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey;
*/
- (KdbEntry *)findEntry:(UUID *)uuid;
- (KdbGroup *)findGroup:(UUID *)uuid;
/*
Return the Binary for the given BinaryRef. nil if none was found
*/
- (Binary *)binaryForRef:(BinaryRef *)binaryRef;
- (Kdb4Tree *)treeV4;
- (Kdb3Tree *)treeV3;
@@ -93,3 +89,13 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey;
- (void)emptyTrash:(id)sender;
@end
@interface MPDocument (Attachments)
- (void)addAttachment:(NSURL *)location toEntry:(KdbEntry *)anEntry;
- (void)saveAttachmentFromEntry:(KdbEntry *)anEntry toLocation:(NSURL *)location;
- (void)saveAttachment:(BinaryRef *)reference toLocation:(NSURL *)location;
- (NSUInteger)nextBinaryId;
- (Binary *)findBinary:(BinaryRef *)reference;
@end