基礎(chǔ)類方法:生成隨機(jī)驗(yàn)證碼
codeLength驗(yàn)證碼長度
+ (NSString *)randomCode:(int)codeLength
{
CFUUIDRef uuidObj = CFUUIDCreate(nil);
NSString *radomString = [(NSString*)CFBridgingRelease(CFUUIDCreateString(nil, uuidObj)) substringToIndex:codeLength];
CFRelease(uuidObj);
return radomString;
}