C# 클래스 VisualCaptcha.Captcha

파일 보기 프로젝트 열기: lukeautry/visualCaptcha-aspnet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
PossibleImageOptions string>.ImmutableDictionary
ValidAudioOption string>.KeyValuePair
ValidImageOption string>.KeyValuePair

공개 메소드들

메소드 설명
Captcha ( int numberOfImageOptions ) : System

Instantiate a Captcha session with an assortment of possible image selections and an audio option for accessibility

GetAudio ( string type ) : byte[]

Get file content for audio Captcha option

GetFrontEndData ( ) : FrontEndData

Retrieve object containing information needed by client-side library

GetImage ( int index, bool isRetina ) : byte[]

Get file content for image Captcha option

ValidateAnswer ( string answerValue ) : bool

Answer value is valid for either image or audio option

비공개 메소드들

메소드 설명
GetRandomImageOptions ( int numberOfOptions ) : string>.ImmutableDictionary
GetRandomOption ( string>.ICollection options ) : string>.KeyValuePair
IsValidAudio ( string value ) : bool
IsValidImage ( string hashedPath ) : bool
ReadResource ( string optionPath ) : byte[]

메소드 상세

Captcha() 공개 메소드

Instantiate a Captcha session with an assortment of possible image selections and an audio option for accessibility
public Captcha ( int numberOfImageOptions ) : System
numberOfImageOptions int
리턴 System

GetAudio() 공개 메소드

Get file content for audio Captcha option
public GetAudio ( string type ) : byte[]
type string Either mp3 or ogg
리턴 byte[]

GetFrontEndData() 공개 메소드

Retrieve object containing information needed by client-side library
public GetFrontEndData ( ) : FrontEndData
리턴 FrontEndData

GetImage() 공개 메소드

Get file content for image Captcha option
public GetImage ( int index, bool isRetina ) : byte[]
index int Image index
isRetina bool Uses Retina display
리턴 byte[]

ValidateAnswer() 공개 메소드

Answer value is valid for either image or audio option
public ValidateAnswer ( string answerValue ) : bool
answerValue string This could be the hashed value of the image path or the answer to an audio question
리턴 bool

프로퍼티 상세

PossibleImageOptions 공개적으로 프로퍼티

Dictionary of possible images to be displayed client-side Key: The image name (e.g. "Cloud") Value: The hashed value of the image path (e.g. "Cloud.png" --> "198723lkdjlfiwoekjdlsd")
public ImmutableDictionary PossibleImageOptions
리턴 string>.ImmutableDictionary

ValidAudioOption 공개적으로 프로퍼티

The correct question/answer pair for audio accessibility option
public KeyValuePair ValidAudioOption
리턴 string>.KeyValuePair

ValidImageOption 공개적으로 프로퍼티

The correct selection out of the options contained in PossibleImageOptions
public KeyValuePair ValidImageOption
리턴 string>.KeyValuePair