C# Class dlech.SshAgentLib.WinForms.SecureEdit

Secure edit control class. Supports storing passwords in an encrypted form in the process memory.
Mostrar archivo Open project: dlech/SshAgentLib Class Usage Examples

Public Methods

Method Description
Attach ( TextBox tbPasswordBox, EventHandler evTextChanged, bool bHidePassword ) : void

Associate the current secure edit object with a text box.

ContentsEqualTo ( SecureEdit secOther ) : bool
Detach ( ) : void

Remove the current association. You should call this before the text box is destroyed.

EnableProtection ( bool bEnable ) : void
SetPassword ( byte pbUtf8 ) : void
ToUtf8 ( ) : byte[]

Private Methods

Method Description
GetAsString ( ) : string
OnDragCheck ( object sender, DragEventArgs e ) : void
OnDragDrop ( object sender, DragEventArgs e ) : void
OnGotFocus ( object sender, EventArgs e ) : void
OnPasswordTextChanged ( object sender, EventArgs e ) : void
RemoveInsert ( int nLeftRem, int nRightRem, string strInsert ) : void
SecureEdit ( ) : System
ShowCurrentPassword ( int nSelStart, int nSelLength ) : void

Method Details

Attach() public method

Associate the current secure edit object with a text box.
public Attach ( TextBox tbPasswordBox, EventHandler evTextChanged, bool bHidePassword ) : void
tbPasswordBox System.Windows.Forms.TextBox Text box to link to.
evTextChanged EventHandler
bHidePassword bool Initial protection flag.
return void

ContentsEqualTo() public method

public ContentsEqualTo ( SecureEdit secOther ) : bool
secOther SecureEdit
return bool

Detach() public method

Remove the current association. You should call this before the text box is destroyed.
public Detach ( ) : void
return void

EnableProtection() public method

public EnableProtection ( bool bEnable ) : void
bEnable bool
return void

SetPassword() public method

public SetPassword ( byte pbUtf8 ) : void
pbUtf8 byte
return void

ToUtf8() public method

public ToUtf8 ( ) : byte[]
return byte[]