feat: add crate swift-rs
This commit is contained in:
@@ -12,14 +12,18 @@ func isSupportSecureEnclave() -> Bool {
|
||||
return SecureEnclave.isAvailable
|
||||
}
|
||||
|
||||
@_cdecl("print_greeting")
|
||||
func printGreeting(modifier: UnsafePointer<CChar>) {
|
||||
print("Hello \(String(cString: modifier))World!")
|
||||
}
|
||||
|
||||
enum StringError: Error {
|
||||
case base64error
|
||||
}
|
||||
|
||||
func generateKeyPair() throws {
|
||||
var error: Unmanaged<CFError>? = nil;
|
||||
guard
|
||||
let accessCtrl = SecAccessControlCreateWithFlags(
|
||||
guard let accessCtrl = SecAccessControlCreateWithFlags(
|
||||
nil,
|
||||
kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
|
||||
[.privateKeyUsage, .biometryCurrentSet],
|
||||
|
||||
Reference in New Issue
Block a user