//
//  APPLocker.h
//  AIIM
//
//  Created by qitewei on 2025/5/13.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


@interface APPLocker : NSObject



// 单例模式
+ (instancetype)sharedLocker;

// 检查是否设置了密码
- (BOOL)isPasswordSet;

// 检查密码锁是否启用
- (BOOL)isLockEnabled;

// 设置新密码
- (BOOL)setPassword:(NSString *)password error:(NSError **)error;

// 验证应用锁密码
- (BOOL)verifyPassword:(NSString *)password;
// 校验安全密码
- (BOOL)verifySecurtyPassword:(NSString *)password;

// 修改密码
- (BOOL)changePasswordFrom:(NSString *)oldPassword toNewPassword:(NSString *)newPassword error:(NSError **)error;

// 删除密码
- (BOOL)removePasswordWithError:(NSError **)error;

// 启用密码锁
- (BOOL)enableLockWithError:(NSError **)error;

// 禁用密码锁
- (BOOL)disableLockWithError:(NSError **)error;

// 设置安全密码
- (BOOL)setSecurityPassword:(NSString *)password error:(NSError **)error;
@end

NS_ASSUME_NONNULL_END
