SecureStringUtils.ToSecureSpan method

Converts a SecureString to a ReadOnlySpan<char> and passes it to the specified handler. The unmanaged memory is zeroed and freed after the handler executes.

public static void ToSecureSpan(this SecureString secureString, SpanHandler handler)
parameter description
secureString The SecureString to convert.
handler The delegate to handle the ReadOnlySpan<char>.

See Also