Alban Diquet edited this page Aug 16, 2013 · 10 revisions

Introspy API Groups

Data Storage

FileSystem

  • NSData
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag
- (BOOL)writeToFile:(NSString *)path options:(NSDataWritingOptions)mask error:(NSError **)error
- (BOOL)writeToURL:(NSURL *)aURL atomically:(BOOL)flag
- (BOOL)writeToURL:(NSURL *)aURL options:(NSDataWritingOptions)mask error:(NSError **)error
+ (id)dataWithContentsOfFile:(NSString *)path
+ (id)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)mask error:(NSError **)error
+ (id)dataWithContentsOfURL:(NSURL *)aURL
+ (id)dataWithContentsOfURL:(NSURL *)aURL options:(NSDataReadingOptions)mask error:(NSError **)error
- (id)initWithContentsOfFile:(NSString *)path
- (id)initWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)mask error:(NSError **)error
- (id)initWithContentsOfURL:(NSURL *)aURL
- (id)initWithContentsOfURL:(NSURL *)aURL options:(NSDataReadingOptions)mask error:(NSError **)error
  • NSFileHandle
+ (id)fileHandleForReadingAtPath:(NSString *)path
+ (id)fileHandleForReadingFromURL:(NSURL *)url error:(NSError **)error
+ (id)fileHandleForUpdatingAtPath:(NSString *)path
+ (id)fileHandleForUpdatingURL:(NSURL *)url error:(NSError **)error
+ (id)fileHandleForWritingAtPath:(NSString *)path
+ (id)fileHandleForWritingToURL:(NSURL *)url error:(NSError **)error
  • NSFileManager
- (BOOL)createFileAtPath:(NSString *)path contents:(NSData *)contents attributes:(NSDictionary *) attributes
- (NSData *)contentsAtPath:(NSString *)path
- (id <NSObject, NSCopying, NSCoding>)ubiquityIdentityToken
  • NSInputStream
+ (id)inputStreamWithFileAtPath:(NSString *)path
+ (id)inputStreamWithURL:(NSURL *)url
- (id)initWithFileAtPath:(NSString *)path
- (id)initWithURL:(NSURL *)url
  • NSOutputStream
+ (id)outputStreamToFileAtPath:(NSString *)path append:(BOOL)shouldAppend
+ (id)outputStreamWithURL:(NSURL *)url append:(BOOL)shouldAppend
- (id)initToFileAtPath:(NSString *)path append:(BOOL)shouldAppend
- (id)initWithURL:(NSURL *)url append:(BOOL)shouldAppend

User Preferences

  • NSUserDefaults
- (void)setBool:(BOOL)value forKey:(NSString *)defaultName
- (void)setFloat:(float)value forKey:(NSString *)defaultName
- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName
- (void)setURL:(NSURL *)url forKey:(NSString *)defaultName
- (void)setDouble:(double)value forKey:(NSString *)defaultName
- (NSArray *)arrayForKey:(NSString *)defaultName
- (BOOL)boolForKey:(NSString *)defaultName
- (NSData *)dataForKey:(NSString *)defaultName
- (NSDictionary *)dictionaryForKey:(NSString *)defaultName
- (float)floatForKey:(NSString *)defaultName
- (double)doubleForKey:(NSString *)defaultName
- (NSInteger)integerForKey:(NSString *)defaultName
- (NSArray *)stringArrayForKey:(NSString *)defaultName
- (NSString *)stringForKey:(NSString *)defaultName
- (NSURL *)URLForKey:(NSString *)defaultName
- (NSDictionary *)dictionaryRepresentation

Keychain

OSStatus SecItemAdd (CFDictionaryRef attributes, CFTypeRef *result);
OSStatus SecItemCopyMatching (CFDictionaryRef query, CFTypeRef *result);
OSStatus SecItemDelete (CFDictionaryRef query);
OSStatus SecItemUpdate (CFDictionaryRef query, CFDictionaryRef attributesToUpdate);

Crypto

Common Crypto

  • CCCryptor
CCCryptorStatus CCCryptorCreate(
    CCOperation op, 
    CCAlgorithm alg, 
    CCOptions options, 
    const void *key, 
    size_t keyLength, 
    const void *iv, 
    CCCryptorRef *cryptorRef);
CCCryptorStatus CCCryptorCreateFromData(
    CCOperation op,
    CCAlgorithm alg,
    CCOptions options,
    const void *key,
    size_t keyLength,
    const void *iv,
    const void *data,
    size_t dataLength, 
    CCCryptorRef *cryptorRef, 
    size_t *dataUsed);
CCCryptorStatus CCCryptorUpdate(
    CCCryptorRef cryptorRef,
    const void *dataIn,
    size_t dataInLength,
    void *dataOut,
    size_t dataOutAvailable,
    size_t *dataOutMoved);
CCCryptorStatus CCCryptorFinal(
    CCCryptorRef cryptorRef,
    void *dataOut,
    size_t dataOutAvailable,
    size_t *dataOutMoved);
CCCryptorStatus CCCrypt(
    CCOperation op,
    CCAlgorithm alg,
    CCOptions options,
    const void *key,
    size_t keyLength,
    const void *iv,
    const void *dataIn,
    size_t dataInLength,
    void *dataOut,
    size_t dataOutAvailable,
    size_t *dataOutMoved);
  • Common Digest
unsigned char * CC_MD2(const void *data, CC_LONG len, unsigned char *md);
int CC_MD2_Update(CC_MD2_CTX *c, const void *data, CC_LONG len);
int CC_MD2_Final(unsigned char *md, CC_MD2_CTX *c);
unsigned char * CC_MD4(const void *data, CC_LONG len, unsigned char *md);
int CC_MD4_Update(CC_MD4_CTX *c, const void *data, CC_LONG len);
int CC_MD4_Final(unsigned char *md, CC_MD4_CTX *c);
unsigned char * CC_MD5(const void *data, CC_LONG len, unsigned char *md);
int CC_MD5_Update(CC_MD5_CTX *c, const void *data, CC_LONG len);
int CC_MD5_Final(unsigned char *md, CC_MD5_CTX *c);
unsigned char * CC_SHA1(const void *data, CC_LONG len, unsigned char *md);
int CC_SHA1_Update(CC_SHA1_CTX *c, const void *data, CC_LONG len);
int CC_SHA1_Final(unsigned char *md, CC_SHA1_CTX *c);
unsigned char * CC_SHA256(const void *data, CC_LONG len, unsigned char *md);
int CC_SHA256_Update(CC_SHA256_CTX *c, const void *data, CC_LONG len);
int CC_SHA256_Final(unsigned char *md, CC_SHA256_CTX *c);
unsigned char * CC_SHA512(const void *data, CC_LONG len, unsigned char *md);
int CC_SHA512_Update(CC_SHA512_CTX *c, const void *data, CC_LONG len);
int CC_SHA512_Final(unsigned char *md, CC_SHA512_CTX *c);
  • CCHMAC
void CCHmacInit(CCHmacContext *ctx, CCHmacAlgorithm algorithm, const void *key, size_t keyLength);
void CCHmacUpdate(CCHmacContext *ctx, const void *data, size_t dataLength);
void CCHmacFinal(CCHmacContext *ctx, void *macOut);
void CCHmac(CCHmacAlgorithm algorithm, const void *key, size_t keyLength, const void *data, size_t dataLength, void *macOut);
  • CCKeyDerivationPBKDF
int CCKeyDerivationPBKDF(
    CCPBKDFAlgorithm algorithm,
    const char *password,
    size_t passwordLen,
    const uint8_t *salt,
    size_t saltLen,
    CCPseudoRandomAlgorithm prf,
    uint rounds,
    uint8_t *derivedKey,
    size_t derivedKeyLen);

LibC

int rand();
long random();

Security Framework

  • PKCS12
OSStatus SecPKCS12Import(CFDataRef pkcs12_data, CFDictionaryRef options, CFArrayRef *items);

Network

HTTP

  • NSURLConnection
- (id)initWithRequest:(NSURLRequest *)request delegate:(id < NSURLConnectionDelegate >)delegate
- (id)initWithRequest:(NSURLRequest *)request delegate:(id < NSURLConnectionDelegate >)delegate startImmediately:(BOOL)startImmediately
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)error
  • NSURLConnectionDelegate
- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse
- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
  • NSURLAuthenticationChallengeSender
- (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
- (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
  • NSURLCredentials
- (id)initWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence
- (id)initWithTrust:(SecTrustRef)trust
- (id)initWithIdentity:(SecIdentityRef)identity certificates:(NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence
  • NSHTTPCookie
- (id)initWithProperties:(NSDictionary *)properties
+ (NSArray *)cookiesWithResponseHeaderFields:(NSDictionary *)headerFields forURL:(NSURL *)theURL

IPC

Pasteboard

  • UIPasteboard
+ (UIPasteboard *)generalPasteboard
+ (UIPasteboard *)pasteboardWithName:(NSString *)pasteboardName create:(BOOL)create
+ (UIPasteboard *)pasteboardWithUniqueName
- (NSData *)dataForPasteboardType:(NSString *)pasteboardType
- (NSArray *)dataForPasteboardType:(NSString *)pasteboardType inItemSet:(NSIndexSet *)itemSet
- (void)setData:(NSData *)data forPasteboardType:(NSString *)pasteboardType
- (void)setValue:(id)value forPasteboardType:(NSString *)pasteboardType
- (void)addItems:(NSArray *)items
- (id)valueForPasteboardType:(NSString *)pasteboardType
  • UIApplication
- (void)setDelegate: (id)delegate
  • UIApplicationDelegate
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
  • URL schemes

Misc

XML

  • NSXMLParser
- (id)initWithContentsOfURL:(NSURL *)url
- (id)initWithData:(NSData *)data
- (id)initWithStream:(NSInputStream *)stream
- (void)setShouldResolveExternalEntities:(BOOL)shouldResolveExternalEntities
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.