Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetAt()

void System.Security.SecureString.SetAt ( int index,
char c )
inline

Definition at line 273 of file SecureString.cs.

274 {
275 lock (_methodLock)
276 {
277 if (index < 0 || index >= _decryptedLength)
278 {
279 throw new ArgumentOutOfRangeException("index", SR.ArgumentOutOfRange_IndexString);
280 }
283 SafeBuffer bufferToRelease = null;
284 try
285 {
287 AcquireSpan(ref bufferToRelease)[index] = c;
288 }
289 finally
290 {
292 bufferToRelease?.DangerousRelease();
293 }
294 }
295 }
unsafe Span< char > AcquireSpan(ref SafeBuffer bufferToRelease)

References System.Security.SecureString._decryptedLength, System.Security.SecureString._methodLock, System.Security.SecureString.AcquireSpan(), System.SR.ArgumentOutOfRange_IndexString, System.Runtime.InteropServices.SafeHandle.DangerousRelease(), System.Security.SecureString.EnsureNotDisposed(), System.Security.SecureString.EnsureNotReadOnly(), System.index, System.Security.SecureString.ProtectMemory(), and System.Security.SecureString.UnprotectMemory().