| 22 | ///////////////////////////////////////////////////////////////////////////// |
| 23 | |
| 24 | class CSecureEdit : public CEdit |
| 25 | { |
| 26 | public: |
| 27 | |
| 28 | // disallow copying |
| 29 | CSecureEdit(CSecureEdit const&) = delete; |
| 30 | void operator=(CSecureEdit const&) = delete; |
| 31 | |
| 32 | CSecureEdit(); |
| 33 | virtual ~CSecureEdit(); |
| 34 | |
| 35 | void SetRealText(const WCHAR *pszNewString); |
| 36 | WCHAR * m_strRealText; |
| 37 | |
| 38 | BOOL ArePasswordBuffersLocked() { return m_pBuf && m_pBufOld ? m_pBuf->IsLocked() && m_pBufOld->IsLocked() : FALSE; }; |
| 39 | |
| 40 | //{{AFX_VIRTUAL(CSecureEdit) |
| 41 | //}}AFX_VIRTUAL |
| 42 | |
| 43 | private: |
| 44 | WCHAR * m_strOldText; |
| 45 | LockZeroBuffer<WCHAR> *m_pBuf; |
| 46 | LockZeroBuffer<WCHAR> *m_pBufOld; |
| 47 | int m_nOldLen; |
| 48 | |
| 49 | protected: |
| 50 | //{{AFX_MSG(CSecureEdit) |
| 51 | afx_msg void OnUpdate(); |
| 52 | //}}AFX_MSG |
| 53 | |
| 54 | DECLARE_MESSAGE_MAP() |
| 55 | }; |
| 56 | |
| 57 | ///////////////////////////////////////////////////////////////////////////// |
| 58 |
nothing calls this directly
no outgoing calls
no test coverage detected