CryptProtectData

[DllImport("Crypt32.dll", SetLastError = true)]
public static extern bool CryptProtectData(
   ref DATA_BLOB pDataIn,
   string szDataDescr,
   ref DATA_BLOB pOptionalEntropy,
   IntPtr pvReserved,
   ref CRYPTPROTECT_PROMPTSTRUCT pPromptStruct,
   uint dwFlags,
   ref DATA_BLOB pDataOut
);

Microsoft documentation: Link

Last updated