private static extern bool CryptUnprotectData(ref DPAPINativeDATABLOB cipherText, ref string description, ref DPAPINativeDATABLOB entropy, IntPtr reserved, ref DPAPINativeCRYPTPROTECTPROMPTSTRUCT prompt, int flags, ref DPAPINativeDATABLOB plainText);
///<summary> /// Performs encryption on the data in a <see cref="DPAPINativeDATABLOB"/> structure ///</summary> ///<param name="plainText">Structure that contains the plaintext to be encrypted.</param> ///<param name="description">A readable description of the data to be encrypted.</param> ///<param name="entropy">Structure that contains a password or other additional entropy used to encrypt the data.</param> ///<param name="reserved">Reserved for future use and must be set to NULL.</param> ///<param name="prompt">Structure that provides information about where and when prompts are to be displayed and what the content of those prompts should be.</param> ///<param name="flags">Crypt Protection</param> ///<param name="cipherText">Structure that receives the encrypted data.</param> ///<returns>If the function succeeds, then <c>TRUE</c> else <c>FALSE</c>.</returns> private static bool ProtectData(ref DPAPINativeDATABLOB plainText, string description, ref DPAPINativeDATABLOB entropy, IntPtr reserved, ref DPAPINativeCRYPTPROTECTPROMPTSTRUCT prompt, int flags, ref DPAPINativeDATABLOB cipherText) { return CryptProtectData(ref plainText, description, ref entropy, reserved, ref prompt, flags, ref cipherText); }