Edit

Share via


SecureStringMarshal Class

Definition

Important

This API is not CLS-compliant.

Provides a collection of methods for allocating unmanaged memory and copying unmanaged memory blocks.

C#
public static class SecureStringMarshal
C#
[System.CLSCompliant(false)]
public static class SecureStringMarshal
Inheritance
SecureStringMarshal
Attributes

Methods

SecureStringToCoTaskMemAnsi(SecureString)

Copies the contents of a managed SecureString object to a block of memory allocated from the unmanaged COM task allocator.

SecureStringToCoTaskMemUnicode(SecureString)

Copies the contents of a managed SecureString object to a block of memory allocated from the unmanaged COM task allocator.

SecureStringToGlobalAllocAnsi(SecureString)

Copies the contents of a managed SecureString into unmanaged memory, converting into ANSI format as it copies.

SecureStringToGlobalAllocUnicode(SecureString)

Copies the contents of a managed SecureString object into unmanaged memory.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1