Lines Matching full:_
10 <DllImport("crypt32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
11 Private Shared Function CryptProtectData( _
12 ByRef pPlainText As DATA_BLOB, _
13 ByVal szDescription As String, _
14 ByRef pEntropy As DATA_BLOB, _
15 ByVal pReserved As IntPtr, _
16 ByRef pPrompt As CRYPTPROTECT_PROMPTSTRUCT, _
17 ByVal dwFlags As Integer, _
18 ByRef pCipherText As DATA_BLOB _
22 <DllImport("crypt32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
23 Private Shared Function CryptUnprotectData( _
24 ByRef pCipherText As DATA_BLOB, _
25 ByRef pszDescription As String, _
26 ByRef pEntropy As DATA_BLOB, _
27 ByVal pReserved As IntPtr, _
28 ByRef pPrompt As CRYPTPROTECT_PROMPTSTRUCT, _
29 ByVal dwFlags As Integer, _
30 ByRef pPlainText As DATA_BLOB _
34 <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
40 <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
51 Private Shared Sub InitPrompt _
52 ( _
53 ByRef ps As CRYPTPROTECT_PROMPTSTRUCT _
61 Private Shared Sub InitBLOB _
62 ( _
63 ByVal data As Byte(), _
64 ByRef blob As DATA_BLOB _
76 Throw New Exception( _
92 Public Shared Function Encrypt _
93 ( _
94 ByVal keyType As KeyType, _
95 ByVal plainText As String, _
96 ByVal entropy As String, _
97 ByVal description As String _
109 result = Encrypt(keyType, _
110 Encoding.Unicode.GetBytes(plainText), _
111 Encoding.Unicode.GetBytes(entropy), _
119 Public Shared Function Encrypt _
120 ( _
121 ByVal keyType As KeyType, _
122 ByVal plainTextBytes As Byte(), _
123 ByVal entropyBytes As Byte(), _
124 ByVal description As String _
142 Dim prompt As _
165 Dim success As Boolean = CryptProtectData( _
166 plainTextBlob, _
167 description, _
168 entropyBlob, _
169 IntPtr.Zero, _
170 prompt, _
171 flags, _
177 Throw New Exception("CryptProtectData failed.", _
183 Marshal.Copy(cipherTextBlob.pbData, cipherTextBytes, 0, _