Greetings!
Is there any way how I can get a key's algorithm imported via the SecSertificateCopyPublicKey function in the iOS 10.3 compatible way ?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Greetings!
I try to port a framework written in Swift 5 to Swift 4.2. And encounter syntax error I can't understand.
Code:
private static func ccAESKeyWrap(
rawKey: Data,
keyEncryptionKey: Data) - (data: Data?, status: Int32) {
let alg = CCWrappingAlgorithm(kCCWRAPAES)
var wrappedKeyLength: size_t = CCSymmetricWrappedSize(alg, rawKey.count)
var wrappedKey = Data(count: wrappedKeyLength)
let status = wrappedKey.withUnsafeMutableBytes { (wrappedKeyBytes: UnsafeMutablePointer) in
rawKey.withUnsafeBytes { (rawKeyBytes: UnsafePointer) in
keyEncryptionKey.withUnsafeBytes { (keyEncryptionKeyBytes: UnsafePointer) - Int32 in
guard
let wrappedKeyBytes = wrappedKeyBytes.bindMemory(to: UInt8.self).baseAddress,
let rawKeyBytes = rawKeyBytes.bindMemory(to: UInt8.self).baseAddress,
let keyEncryptionKeyBytes = keyEncryptionKeyBytes.bindMemory(to: UInt8.self).baseAddress
else {
return Int32(kCCMemoryFailure)
}
return CCSymmetricKeyWrap(
alg,
CCrfc3394_iv,
CCrfc3394_ivLen,
keyEncryptionKeyBytes,
keyEncryptionKey.count,
rawKeyBytes, rawKey.count,
wrappedKeyBytes, &wrappedKeyLength)
}
}
}
guard status == kCCSuccess else {
return (nil, status)
}
wrappedKey.removeSubrange(wrappedKeyLength..wrappedKey.count)
return (wrappedKey, status)
}
On string
keyEncryptionKey.withUnsafeBytes { (keyEncryptionKeyBytes: UnsafePointer) - Int32 in
I got the error:
Cannot convert value of type '(UnsafePointer) - Int32' to expected argument type '(UnsafePointer) - '_
Could anyone tell me what do I do wrong ?
Greetings!
I encounter an issue when try building an xcframework from a framework project with Embed and Sign option enabled for the project's pods. When I'm trying to use the xcframework in the final app I get a compile errors: No such module framework's dependency from pod
Failed to build module framework-module-name from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced.
The goal is to get the xcframework contains all the required things. To be able simply add the xcframework to any app without any additional dependencies.
Question: Does the option "Embed and Sign" include all of the libraries into the main project build ?
Greetings!
Is it possible to display UIView in some point of code (in Protocol implementation for exaple) which does not provide any links to current active view ? Example: I have a framework which contains a protocol implementation wich assume to show some view from its own storyboard. How can I take the current NavigationController to push into it a view from framework ?