Skip to content

Instantly share code, notes, and snippets.

/**
http://mythosil.hatenablog.com/entry/20111017/1318873155
http://blog.dealforest.net/2012/03/ios-android-per-aes-crypt-connection/
*/
@interface NSData (AES)
- (NSData *)AES128EncryptedDataWithKey:(NSString *)key;
- (NSData *)AES128DecryptedDataWithKey:(NSString *)key;
- (NSData *)AES128EncryptedDataWithKey:(NSString *)key iv:(NSString *)iv;
@zhubicheng
zhubicheng / log-macro
Last active August 29, 2015 14:16 — forked from nxax/log-macro
// http://stackoverflow.com/questions/969130/nslog-tips-and-tricks
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
// ALog always displays output regardless of the DEBUG setting
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
@zhubicheng
zhubicheng / gist:6918608
Created October 10, 2013 13:46
实现ImageVIew的镜面变化
[UIImageVIew setTransform:CGAffineTransformMakeScale(-1, 1)];
@zhubicheng
zhubicheng / 配置gitignore
Created September 30, 2013 12:35
iOS中Git使用
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3