public ActionResult GetGeneralVerificationCode(GeneralCodeFlags flags, int length = 4) { IImageVerificationCodeFactory factory = new ImageVerificationCodeProvider( new GeneralVerificationCode(flags, length) ) { Width = 89, Height = 32 }; return(File(factory.Draw(), "image/jpg")); }
public GeneralVerificationCode(GeneralCodeFlags codeFlags, int length = 4) { CodeFlags = codeFlags; Length = length; }