gpt4 book ai didi

ios - 在 iOS8 中只能通过指纹验证才能访问钥匙串(keychain)

转载 作者:可可西里 更新时间:2023-11-01 05:53:46 32 4
gpt4 key购买 nike

我需要在 iOS 钥匙串(keychain)上安全地存储/检索项目。

从 Apple KeyChainServicesReference 文档 ( https://developer.apple.com/library/ios/documentation/security/Reference/keychainservices/Reference/reference.html ) 我使用 SecItemCopyMatching 调用检索钥匙串(keychain)项目。后者会弹出一个系统提示,要求根据允许使用指纹或 4 位电话密码的本地钥匙串(keychain)进行身份验证。

虽然我认为指纹验证是安全的,但正是 4 位 PIN 选项降低了我当前的安全性。所以,我的问题是:有没有办法只用指纹选项查询钥匙串(keychain)(没有密码选项,如果指纹验证失败,它就失败了,没有回退到 4 位密码)

我查看了 LocalAuthentication,虽然后者提供了我需要的确切流程,但 LA 不给我访问钥匙串(keychain)的权限,因此 LA 对我没有用

提前致谢

最佳答案

在 LAContext.h 中:

/// Fallback button title.
/// @discussion Allows fallback button title customization. A default title "Enter Password" is used when
/// this property is left nil. If set to empty string, the button will be hidden.
@property (nonatomic, copy) NSString *localizedFallbackTitle;

此代码删除按钮,用户可以使用手指或取消:

LAContext *context = [[LAContext alloc] init];
context.localizedFallbackTitle = @"";
[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics ...

关于ios - 在 iOS8 中只能通过指纹验证才能访问钥匙串(keychain),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25002661/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com