From 618acc7789f0b250138f55183124bdc948106997 Mon Sep 17 00:00:00 2001 From: Joel Arvidsson Date: Mon, 26 Feb 2018 00:14:48 +0100 Subject: [PATCH] Rename TOUCH_ID_* enums to BIOMETRY_* --- RNKeychainManager/RNKeychainManager.m | 16 ++++++++-------- index.js | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/RNKeychainManager/RNKeychainManager.m b/RNKeychainManager/RNKeychainManager.m index 29be8dc..27c2ec1 100644 --- a/RNKeychainManager/RNKeychainManager.m +++ b/RNKeychainManager/RNKeychainManager.m @@ -126,11 +126,11 @@ NSString *accessGroupValue(NSDictionary *options) #define kAccessControlType @"accessControl" #define kAccessControlUserPresence @"UserPresence" -#define kAccessControlTouchIDAny @"TouchIDAny" -#define kAccessControlTouchIDCurrentSet @"TouchIDCurrentSet" +#define kAccessControlBiometryAny @"BiometryAny" +#define kAccessControlBiometryCurrentSet @"BiometryCurrentSet" #define kAccessControlDevicePasscode @"DevicePasscode" -#define kAccessControlTouchIDAnyOrDevicePasscode @"TouchIDAnyOrDevicePasscode" -#define kAccessControlTouchIDCurrentSetOrDevicePasscode @"TouchIDCurrentSetOrDevicePasscode" +#define kAccessControlBiometryAnyOrDevicePasscode @"BiometryAnyOrDevicePasscode" +#define kAccessControlBiometryCurrentSetOrDevicePasscode @"BiometryCurrentSetOrDevicePasscode" #define kBiometryTypeTouchID @"TouchID" #define kBiometryTypeFaceID @"FaceID" @@ -153,19 +153,19 @@ SecAccessControlCreateFlags secureAccessControl(NSDictionary *options) if ([ options[kAccessControlType] isEqualToString: kAccessControlUserPresence ]) { return kSecAccessControlUserPresence; } - else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDAny ]) { + else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryAny ]) { return kSecAccessControlTouchIDAny; } - else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDCurrentSet ]) { + else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSet ]) { return kSecAccessControlTouchIDCurrentSet; } else if ([ options[kAccessControlType] isEqualToString: kAccessControlDevicePasscode ]) { return kSecAccessControlDevicePasscode; } - else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDAnyOrDevicePasscode ]) { + else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryAnyOrDevicePasscode ]) { return kSecAccessControlTouchIDAny|kSecAccessControlOr|kSecAccessControlDevicePasscode; } - else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDCurrentSetOrDevicePasscode ]) { + else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSetOrDevicePasscode ]) { return kSecAccessControlTouchIDCurrentSet|kSecAccessControlOr|kSecAccessControlDevicePasscode; } } diff --git a/index.js b/index.js index a724962..1a379bb 100644 --- a/index.js +++ b/index.js @@ -14,11 +14,11 @@ export const ACCESSIBLE = { export const ACCESS_CONTROL = { USER_PRESENCE: 'UserPresence', - TOUCH_ID_ANY: 'TouchIDAny', - TOUCH_ID_CURRENT_SET: 'TouchIDCurrentSet', + BIOMETRY_ANY: 'BiometryAny', + BIOMETRY_CURRENT_SET: 'BiometryCurrentSet', DEVICE_PASSCODE: 'DevicePasscode', - TOUCH_ID_ANY_OR_DEVICE_PASSCODE: 'TouchIDAnyOrDevicePasscode', - TOUCH_ID_CURRENT_SET_OR_DEVICE_PASSCODE: 'TouchIDCurrentSetOrDevicePasscode', + BIOMETRY_ANY_OR_DEVICE_PASSCODE: 'BiometryAnyOrDevicePasscode', + BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE: 'BiometryCurrentSetOrDevicePasscode', }; export const AUTHENTICATION_TYPE = { @@ -48,11 +48,11 @@ type Options = { type SecAccessControl = | 'UserPresence' - | 'TouchIDAny' - | 'TouchIDCurrentSet' + | 'BiometryAny' + | 'BiometryCurrentSet' | 'DevicePasscode' - | 'TouchIDAnyOrDevicePasscode' - | 'TouchIDCurrentSetOrDevicePasscode'; + | 'BiometryAnyOrDevicePasscode' + | 'BiometryCurrentSetOrDevicePasscode'; type LAPolicy = 'Authentication' | 'AuthenticationWithBiometrics';