iphone Programming Glossary: osstatus
Iphone - How to encrypt NSData with public key and decrypt with private key? http://stackoverflow.com/questions/10072124/iphone-how-to-encrypt-nsdata-with-public-key-and-decrypt-with-private-key const UInt8 privateKeyIdentifier com.apple.sample.privatekey @implementation ViewController SecKeyRef getPublicKeyRef OSStatus sanityCheck noErr SecKeyRef publicKeyReference NULL if publicKeyReference NULL self generateKeyPair 512 NSMutableDictionary.. void encryptWithPublicKey uint8_t plainBuffer cipherBuffer uint8_t cipherBuffer NSLog @ encryptWithPublicKey OSStatus status noErr NSLog @ original plain text 0 s plainBuffer size_t plainBufferSize strlen char plainBuffer size_t cipherBufferSize.. NSLog @ encrypted text s cipherBuffer void decryptWithPrivateKey uint8_t cipherBuffer plainBuffer uint8_t plainBuffer OSStatus status noErr size_t cipherBufferSize strlen char cipherBuffer NSLog @ decryptWithPrivateKey length of buffer lu BUFFER_SIZE..
RSA implementations in Objective C http://stackoverflow.com/questions/10222524/rsa-implementations-in-objective-c const UInt8 privateKeyIdentifier com.apple.sample.privatekey @implementation ViewController SecKeyRef getPublicKeyRef OSStatus sanityCheck noErr SecKeyRef publicKeyReference NULL if publicKeyReference NULL self generateKeyPair 512 NSMutableDictionary.. void encryptWithPublicKey uint8_t plainBuffer cipherBuffer uint8_t cipherBuffer NSLog @ encryptWithPublicKey OSStatus status noErr NSLog @ original plain text 0 s plainBuffer size_t plainBufferSize strlen char plainBuffer size_t cipherBufferSize.. NSLog @ encrypted text s cipherBuffer void decryptWithPrivateKey uint8_t cipherBuffer plainBuffer uint8_t plainBuffer OSStatus status noErr size_t cipherBufferSize strlen char cipherBuffer NSLog @ decryptWithPrivateKey length of buffer lu BUFFER_SIZE..
How do I synthesize sounds with CoreAudio on iPhone/Mac http://stackoverflow.com/questions/1361148/how-do-i-synthesize-sounds-with-coreaudio-on-iphone-mac thread as such #define BUFFER_SIZE 16384 #define BUFFER_COUNT 3 static AudioQueueRef audioQueue void SetupAudioQueue OSStatus err noErr Setup the audio device. AudioStreamBasicDescription deviceFormat deviceFormat.mSampleRate 44100 deviceFormat.mFormatID..
How to programmatically sense the iPhone mute switch? http://stackoverflow.com/questions/287543/how-to-programmatically-sense-the-iphone-mute-switch call this once to init session if gAudioSessionInited AudioSessionInterruptionListener inInterruptionListener NULL OSStatus error if error AudioSessionInitialize NULL NULL inInterruptionListener NULL NSLog @ Error error in AudioSessionInitialize..
Detecting the iPhone's Ring / Silent / Mute switch using AVAudioPlayer not working? http://stackoverflow.com/questions/6901363/detecting-the-iphones-ring-silent-mute-switch-using-avaudioplayer-not-worki and SDK version I'm calling it like so BOOL deviceIsSilenced CFStringRef state UInt32 propertySize sizeof CFStringRef OSStatus audioStatus AudioSessionGetProperty kAudioSessionProperty_AudioRoute &propertySize &state if audioStatus kAudioSessionNoError..
SFHFKeychainUtils. iOS keychain. ARC compatible http://stackoverflow.com/questions/7663443/sfhfkeychainutils-ios-keychain-arc-compatible attributeQuery query mutableCopy attributeQuery setObject id kCFBooleanTrue forKey __bridge id kSecReturnAttributes OSStatus status SecItemCopyMatching CFDictionaryRef attributeQuery CFTypeRef attributeResult I tried OSStatus status SecItemCopyMatching.. OSStatus status SecItemCopyMatching CFDictionaryRef attributeQuery CFTypeRef attributeResult I tried OSStatus status SecItemCopyMatching __bridge CFDictionaryRef attributeQuery CFTypeRef attributeResult also CFTypeRef subAttributeResult.. CFTypeRef attributeResult also CFTypeRef subAttributeResult CFTypeRef objc_unretainedPointer attributeResult OSStatus status SecItemCopyMatching __bridge CFDictionaryRef attributeQuery CFTypeRef subAttributeResult These 2 being the only 2..
How to detect iphone is on silent mode http://stackoverflow.com/questions/833304/how-to-detect-iphone-is-on-silent-mode look like CFStringRef state nil UInt32 propertySize sizeof CFStringRef AudioSessionInitialize NULL NULL NULL NULL OSStatus status AudioSessionGetProperty kAudioSessionProperty_AudioRoute propertySize state if status kAudioSessionNoError return..
|