C# Class dlech.SshAgentLib.Ui.QtAgent.SecureEdit

Secure edit control class. Supports storing passwords in an encrypted form in the process memory (Windows only).
Inheritance: QtCore.QObject
显示文件 Open project: dlech/SshAgentLib Class Usage Examples

Public Methods

Method Description
Attach ( QLineEdit aLineEdit, bool aHidePassword ) : void

Associate the current secure edit object with a text box.

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

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

EnableProtection ( bool aEnable ) : void
SetPassword ( byte aNewPassword ) : void

Sets the password.

ToUtf8 ( ) : byte[]

Private Methods

Method Description
GetAsString ( ) : string
RemoveInsert ( int aLeftRemainingCount, int aRigthRemainingCount, string aStringToInsert ) : void
SecureEdit ( ) : System
ShowCurrentPassword ( int nSelStart, int nSelLength ) : void
mPasswordLineEdit_DragEnterEvent ( object sender, QEventArgs e ) : void
mPasswordLineEdit_DragMoveEvent ( object sender, QEventArgs e ) : void
mPasswordLineEdit_DropEvent ( object sender, QEventArgs e ) : void
mPasswordLineEdit_FocusInEvent ( object sender, EventArgs e ) : void
mPasswordLineEdit_TextChanged ( string aText ) : void

Method Details

Attach() public method

Associate the current secure edit object with a text box.
public Attach ( QLineEdit aLineEdit, bool aHidePassword ) : void
aLineEdit QLineEdit Text box to link to.
aHidePassword bool Initial protection flag.
return void

ContentsEqualTo() public method

public ContentsEqualTo ( SecureEdit aSecureEdit ) : bool
aSecureEdit 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 aEnable ) : void
aEnable bool
return void

SetPassword() public method

Sets the password.
public SetPassword ( byte aNewPassword ) : void
aNewPassword byte /// A new password (UTF8). ///
return void

ToUtf8() public method

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