MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / SetRealText

Method SetRealText

cppcryptfs/ui/SecureEdit.cpp:131–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void CSecureEdit::SetRealText(const WCHAR *pszNewString)
132{
133 LockZeroBuffer<WCHAR> dotsBuf(MAX_PASSWORD_LEN+1, true);
134 WCHAR * strDots = dotsBuf.m_buf;
135 int i = 0;
136
137 if(pszNewString == NULL) return;
138
139 wcscpy_s(m_strRealText, MAX_PASSWORD_LEN+1, pszNewString);
140 wcscpy_s(m_strOldText, MAX_PASSWORD_LEN+1, pszNewString);
141 m_nOldLen = (int)wcslen(m_strRealText);
142
143 for(i = 0; i < m_nOldLen; i++) strDots[i] = SE_PASSWORD_CHAR;
144 strDots[i] = '\0';
145
146 SetWindowText(strDots);
147
148 if (wcslen(pszNewString) < 1) {
149 m_pBuf->Clear();
150 m_pBufOld->Clear();
151 }
152}
153

Callers 6

CreateCryptfsMethod · 0.80
MountMethod · 0.80
OnClickedMountMethod · 0.80
OnSetActiveMethod · 0.80
OnCbnSelchangePathMethod · 0.80
OnEditchangePathMethod · 0.80

Calls 1

ClearMethod · 0.45

Tested by

no test coverage detected