Connectivity Software User's Guide and Reference
CryptEncrypt Method



OpcLabs.BaseLibPrimitives Assembly > OpcLabs.BaseLib.Licensing Namespace > Crypto.NativeMethods Class : CryptEncrypt Method

The value of this parameter can be null (Nothing in Visual Basic).

Syntax
'Declaration
 
Public Shared Function CryptEncrypt( _
   ByVal hKey As IntPtr, _
   ByVal hHash As IntPtr, _
   ByVal Final As Boolean, _
   ByVal dwFlags As UInteger, _
   ByVal pbData() As Byte, _
   ByRef pdwDataLen As UInteger, _
   ByVal dwBufLen As UInteger _
) As Boolean
'Usage
 
Dim hKey As IntPtr
Dim hHash As IntPtr
Dim Final As Boolean
Dim dwFlags As UInteger
Dim pbData() As Byte
Dim pdwDataLen As UInteger
Dim dwBufLen As UInteger
Dim value As Boolean
 
value = Crypto.NativeMethods.CryptEncrypt(hKey, hHash, Final, dwFlags, pbData, pdwDataLen, dwBufLen)
public static bool CryptEncrypt( 
   IntPtr hKey,
   IntPtr hHash,
   bool Final,
   uint dwFlags,
   byte[] pbData,
   ref uint pdwDataLen,
   uint dwBufLen
)

Parameters

hKey
hHash
Final
dwFlags
pbData

The value of this parameter can be null (Nothing in Visual Basic).

pdwDataLen
dwBufLen
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also