You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i am using this package that generate privateKey for generating signature. Im working on native module (and then also extension) in swift and i need to create signature there too. I know its possible but i need that private Key. I created keys with package and function is also returning true on if BiometricKeyExist, but when i try to create query and find the key in my swift code/module...i am always getting errSecItemNotFound (code: -25300). How that can be possible? That private key should be stored in keychain and to find it, package use code like this:
My function in swift looks something like this (i am trying to find that private key and return, but for simplicity i will only write code to find that key...it doesnt work already in that stage):
@objc
func getPrivateKey(_ promise: @escaping RCTPromiseResolveBlock, rejector reject: RCTPromiseRejectBlock) -> Void {
guard let biometricKeyTag = "com.rnbiometrics.biometricKey".data(using: .utf8) else {
return promise("Error")
}
let query = [
kSecClass: kSecClassKey,
kSecAttrApplicationTag: biometricKeyTag,
kSecAttrKeyType: kSecAttrKeyTypeRSA,
kSecAttrAccessible: kSecAttrAccessibleWhenUnlocked,
kSecUseAuthenticationUI: kSecUseAuthenticationUIFail,
] as CFDictionary
let status = SecItemCopyMatching(query, nil)
guard status == errSecSuccess else {
return promise("Error")
}
return promise("Success")
}
The text was updated successfully, but these errors were encountered:
Hi, i am using this package that generate privateKey for generating signature. Im working on native module (and then also extension) in swift and i need to create signature there too. I know its possible but i need that private Key. I created keys with package and function is also returning true on if BiometricKeyExist, but when i try to create query and find the key in my swift code/module...i am always getting errSecItemNotFound (code: -25300). How that can be possible? That private key should be stored in keychain and to find it, package use code like this:
My function in swift looks something like this (i am trying to find that private key and return, but for simplicity i will only write code to find that key...it doesnt work already in that stage):
The text was updated successfully, but these errors were encountered: