-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Swift to set attributes for seckey
- Loading branch information
1 parent
8dbebc2
commit 14d5781
Showing
9 changed files
with
83 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
cd prebuilt | ||
|
||
xcodebuild build -scheme Attributes -configuration Release -arch arm64 -sdk 'iphoneos' \ | ||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ | ||
-derivedDataPath './Attributes/build/' \ | ||
-project Attributes/Attributes.xcodeproj | ||
cp Attributes/build/Build/Products/Release-iphoneos/libAttributes.a Attributes/binaries/arm64 | ||
rm -rf Attributes/build | ||
|
||
xcodebuild build -scheme Attributes -configuration Release -arch arm64 -sdk 'iphonesimulator' \ | ||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ | ||
-derivedDataPath './Attributes/build/' \ | ||
-project Attributes/Attributes.xcodeproj | ||
cp Attributes/build/Build/Products/Release-iphonesimulator/libAttributes.a Attributes/binaries/arm64-simulator | ||
rm -rf Attributes/build | ||
|
||
xcodebuild build -scheme Attributes -configuration Release -arch x86_64 -sdk 'iphonesimulator' \ | ||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ | ||
-derivedDataPath './Attributes/build/' \ | ||
-project Attributes/Attributes.xcodeproj | ||
cp Attributes/build/Build/Products/Release-iphonesimulator/libAttributes.a Attributes/binaries/x64 | ||
rm -rf Attributes/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Foundation | ||
import Security | ||
|
||
@objc public class Attributes: NSObject { | ||
@objc public class func test() -> Int { | ||
return 12 | ||
} | ||
|
||
@objc public class func keyAttributes(_ access: SecAccessControl, tag: String) -> CFDictionary { | ||
return [ | ||
kSecAttrKeyType as String : kSecAttrKeyTypeEC, | ||
kSecAttrKeySizeInBits as String : 256, | ||
kSecAttrTokenID as String : kSecAttrTokenIDSecureEnclave, | ||
kSecPrivateKeyAttrs as String : [ | ||
kSecAttrIsPermanent as String : true, | ||
kSecAttrApplicationTag as String : tag, | ||
kSecAttrAccessControl as String : access | ||
] | ||
] as CFDictionary | ||
} | ||
|
||
@objc public class func keyQuery(_ tag: String) -> CFDictionary { | ||
return [ | ||
kSecClass as String : kSecClassKey, | ||
kSecAttrApplicationTag as String : tag, | ||
kSecAttrKeyType as String : kSecAttrKeyTypeEC, | ||
kSecMatchLimit as String : kSecMatchLimitOne, | ||
kSecReturnRef as String : true | ||
] as CFDictionary | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
mobileapp/src/iosMain/kotlin/io/github/landrynorris/multifactor/platform/Initialize.ios.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters