Post

Replies

Boosts

Views

Activity

Reply to Diffie Hellman Key exchange with .Net Cryptography
Thank you for your reply. Loopbacks and further experimentation, as well as reading code from .Net and Android got me the solution: let symmetricKey = sharedSecret.withUnsafeBytes { rawBufferPointer in var sha = SHA256() sha.update(bufferPointer: rawBufferPointer) let digest = sha.finalize() return SymmetricKey(data: digest) } return symmetricKey My biggest question here is: Is this x9.63 or hkdf, and I am simply using these functions wrong? Or is this derivation method missing from CryptoKit?
Aug ’23
Reply to Info.plist preprocessing appears to have issues
Answering to myself: Works as designed The trick here is that INFOPLIST_PREPROCESS = YES, and that the defines are in the preprocess header. To make it work like about, turn off INFOPLIST_PREPROCESS. What I actually was is to keep it on, get rid of the .xcconfig files entirely, and use <key>SharedGroupName</key> <string>SHARED_GROUP_NAME_IOS</string> which solved my primary problem
Jun ’23
Reply to Reading (NS)Bundle in iOS after relaunch
It seems the path to the file change after a re-launch: The prefs say …/Containers/Data/Application/25E88AEC-9B14-48E9-A7BF-3F93C05AFCB8/Documents/Sample.quizlist When I get the path to the documents folder after relaunch, it is …/Containers/Data/Application/DA18292E-D744-41FF-A98B-A2085E9F4318/Documents/Sample.quizlist I assume this is a feature, not a bug. But why? And where is it documented?
Sep ’22
Reply to ld: library not found for -lSystem
For starters, -static solves that. However, the executable crashes: // Setup the parameters to print hello world // and then call the Kernel to do it. start: mov X0, #1 &#9;&#9;// 1 = StdOut ldr X1, =helloworld // string to print mov X2, #13 &#9;&#9;// length of the string mov X16, #4 &#9;&#9;// Mach write system call 4 svc 80 &#9;&#9;// Call Mach to output the string // Setup the parameters to exit the program // and then call the Kernel to do it. mov&#9;&#9; X0, #0&#9;&#9;&#9;// Use 0 return code &#9;&#9;&#9;&#9;mov&#9;&#9; X8, #1&#9;&#9;&#9;// Service command code 1 terminates this program &#9;&#9;&#9;&#9;svc&#9;&#9; 80&#9;&#9;&#9;&#9;&#9; // Call Mach to terminate the program .data helloworld:&#9;&#9;&#9;.ascii&#9;"Hello World!\n"
Jul ’20
Reply to Run Script Phase & Environment Variables
What I do is to create an Info.template.plist file, which is under version control.In the run script phase, I copy it, and modify the resulting Info.plist, that is not under version control.This of course remains an evil hack, and exporting variables from the run script phase would be preferable (And, if you are reading this, this approach has other problems, especially when fastlane depends on that Info.plist …)
Jan ’20