public PasswordDialog() { InitializeComponent(); if (Type.GetType("Mono.Runtime") == null) { Icon = Properties.Resources.KeeAgent_icon; } else { Icon = Properties.Resources.KeeAgent_icon_mono; } mSecureEdit = new SecureEdit(); mSecureEdit.Attach(passwordTextBox, null, true); }
public bool ContentsEqualTo(SecureEdit secOther) { Debug.Assert(secOther != null); if (secOther == null) { return(false); } byte[] pbThis = ToUtf8(); byte[] pbOther = secOther.ToUtf8(); bool bEqual = MemUtil.ArraysEqual(pbThis, pbOther); MemUtil.ZeroByteArray(pbThis); MemUtil.ZeroByteArray(pbOther); return(bEqual); }