Files
MacPass/MacPass/MPPasswordInputController.h
Julius Zint 197a4145e8 Code refactoring to implement suggestions from the code review.
The fileURL for the current document does no longer have to be passed
in as a parameter but instead is retreived by accessing the windowControllers
document that hosts the MPPasswordInputController.

_touchIdHandleUnlockAttempt got renamed to _touchIdUpdateKeyForCurrentDocument
to better state its actual purpose and should no longer be called
on unsuccessfull unlock attempts. It also now removes stored keys if the
state of the TouchIdEnabled button has changed.

The key, that is derived from the document, is now the same whether it is
used to store it in the transient dictionary or the userdefaults
2021-02-21 11:27:41 +01:00

36 lines
1.3 KiB
Objective-C

//
// MPPasswordInputController.h
// MacPass
//
// Created by Michael Starke on 17.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPViewController.h"
#import "KeePassKit/KeePassKit.h"
@class KPKCompositeKey;
@interface MPPasswordInputController : MPViewController <NSTouchBarDelegate>
typedef BOOL (^passwordInputCompletionBlock)(KPKCompositeKey *key, NSURL* keyFileURL, BOOL didCancel, NSError *__autoreleasing*error);
- (void)requestPasswordWithMessage:(NSString *)message cancelLabel:(NSString *)cancelLabel completionHandler:(passwordInputCompletionBlock)completionHandler;
@end