ホーム › Security.Cryptography › SslCreateClientAuthHash
SslCreateClientAuthHash
関数SSLクライアント認証用ハンドシェイクハッシュを作成する。
シグネチャ
// ncrypt.dll
#include <windows.h>
HRESULT SslCreateClientAuthHash(
NCRYPT_PROV_HANDLE hSslProvider,
NCRYPT_HASH_HANDLE* phHandshakeHash,
DWORD dwProtocol,
DWORD dwCipherSuite,
LPCWSTR pszHashAlgId,
DWORD dwFlags
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hSslProvider | NCRYPT_PROV_HANDLE | in | Schannel SSLプロバイダのハンドル。 |
| phHandshakeHash | NCRYPT_HASH_HANDLE* | out | 生成されたクライアント認証用ハンドシェイクハッシュのハンドルを受け取る出力先。 |
| dwProtocol | DWORD | in | 対象のSSL/TLSプロトコルバージョンを示す値。 |
| dwCipherSuite | DWORD | in | 対象の暗号スイートを示す値。 |
| pszHashAlgId | LPCWSTR | in | 使用するハッシュアルゴリズム識別子文字列。 |
| dwFlags | DWORD | in | 動作を制御するフラグ。 |
戻り値の型: HRESULT
各言語での呼び出し定義
// ncrypt.dll
#include <windows.h>
HRESULT SslCreateClientAuthHash(
NCRYPT_PROV_HANDLE hSslProvider,
NCRYPT_HASH_HANDLE* phHandshakeHash,
DWORD dwProtocol,
DWORD dwCipherSuite,
LPCWSTR pszHashAlgId,
DWORD dwFlags
);[DllImport("ncrypt.dll", ExactSpelling = true)]
static extern int SslCreateClientAuthHash(
UIntPtr hSslProvider, // NCRYPT_PROV_HANDLE
out UIntPtr phHandshakeHash, // NCRYPT_HASH_HANDLE* out
uint dwProtocol, // DWORD
uint dwCipherSuite, // DWORD
[MarshalAs(UnmanagedType.LPWStr)] string pszHashAlgId, // LPCWSTR
uint dwFlags // DWORD
);<DllImport("ncrypt.dll", ExactSpelling:=True)>
Public Shared Function SslCreateClientAuthHash(
hSslProvider As UIntPtr, ' NCRYPT_PROV_HANDLE
<Out> ByRef phHandshakeHash As UIntPtr, ' NCRYPT_HASH_HANDLE* out
dwProtocol As UInteger, ' DWORD
dwCipherSuite As UInteger, ' DWORD
<MarshalAs(UnmanagedType.LPWStr)> pszHashAlgId As String, ' LPCWSTR
dwFlags As UInteger ' DWORD
) As Integer
End Function' hSslProvider : NCRYPT_PROV_HANDLE
' phHandshakeHash : NCRYPT_HASH_HANDLE* out
' dwProtocol : DWORD
' dwCipherSuite : DWORD
' pszHashAlgId : LPCWSTR
' dwFlags : DWORD
Declare PtrSafe Function SslCreateClientAuthHash Lib "ncrypt" ( _
ByVal hSslProvider As LongPtr, _
ByRef phHandshakeHash As LongPtr, _
ByVal dwProtocol As Long, _
ByVal dwCipherSuite As Long, _
ByVal pszHashAlgId As LongPtr, _
ByVal dwFlags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SslCreateClientAuthHash = ctypes.windll.ncrypt.SslCreateClientAuthHash
SslCreateClientAuthHash.restype = ctypes.c_int
SslCreateClientAuthHash.argtypes = [
ctypes.c_size_t, # hSslProvider : NCRYPT_PROV_HANDLE
ctypes.c_void_p, # phHandshakeHash : NCRYPT_HASH_HANDLE* out
wintypes.DWORD, # dwProtocol : DWORD
wintypes.DWORD, # dwCipherSuite : DWORD
wintypes.LPCWSTR, # pszHashAlgId : LPCWSTR
wintypes.DWORD, # dwFlags : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ncrypt.dll')
SslCreateClientAuthHash = Fiddle::Function.new(
lib['SslCreateClientAuthHash'],
[
Fiddle::TYPE_UINTPTR_T, # hSslProvider : NCRYPT_PROV_HANDLE
Fiddle::TYPE_VOIDP, # phHandshakeHash : NCRYPT_HASH_HANDLE* out
-Fiddle::TYPE_INT, # dwProtocol : DWORD
-Fiddle::TYPE_INT, # dwCipherSuite : DWORD
Fiddle::TYPE_VOIDP, # pszHashAlgId : LPCWSTR
-Fiddle::TYPE_INT, # dwFlags : DWORD
],
Fiddle::TYPE_INT)#[link(name = "ncrypt")]
extern "system" {
fn SslCreateClientAuthHash(
hSslProvider: usize, // NCRYPT_PROV_HANDLE
phHandshakeHash: *mut usize, // NCRYPT_HASH_HANDLE* out
dwProtocol: u32, // DWORD
dwCipherSuite: u32, // DWORD
pszHashAlgId: *const u16, // LPCWSTR
dwFlags: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ncrypt.dll")]
public static extern int SslCreateClientAuthHash(UIntPtr hSslProvider, out UIntPtr phHandshakeHash, uint dwProtocol, uint dwCipherSuite, [MarshalAs(UnmanagedType.LPWStr)] string pszHashAlgId, uint dwFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ncrypt_SslCreateClientAuthHash' -Namespace Win32 -PassThru
# $api::SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags)#uselib "ncrypt.dll"
#func global SslCreateClientAuthHash "SslCreateClientAuthHash" sptr, sptr, sptr, sptr, sptr, sptr
; SslCreateClientAuthHash hSslProvider, varptr(phHandshakeHash), dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags ; 戻り値は stat
; hSslProvider : NCRYPT_PROV_HANDLE -> "sptr"
; phHandshakeHash : NCRYPT_HASH_HANDLE* out -> "sptr"
; dwProtocol : DWORD -> "sptr"
; dwCipherSuite : DWORD -> "sptr"
; pszHashAlgId : LPCWSTR -> "sptr"
; dwFlags : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "ncrypt.dll" #cfunc global SslCreateClientAuthHash "SslCreateClientAuthHash" sptr, var, int, int, wstr, int ; res = SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags) ; hSslProvider : NCRYPT_PROV_HANDLE -> "sptr" ; phHandshakeHash : NCRYPT_HASH_HANDLE* out -> "var" ; dwProtocol : DWORD -> "int" ; dwCipherSuite : DWORD -> "int" ; pszHashAlgId : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "ncrypt.dll" #cfunc global SslCreateClientAuthHash "SslCreateClientAuthHash" sptr, sptr, int, int, wstr, int ; res = SslCreateClientAuthHash(hSslProvider, varptr(phHandshakeHash), dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags) ; hSslProvider : NCRYPT_PROV_HANDLE -> "sptr" ; phHandshakeHash : NCRYPT_HASH_HANDLE* out -> "sptr" ; dwProtocol : DWORD -> "int" ; dwCipherSuite : DWORD -> "int" ; pszHashAlgId : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT SslCreateClientAuthHash(NCRYPT_PROV_HANDLE hSslProvider, NCRYPT_HASH_HANDLE* phHandshakeHash, DWORD dwProtocol, DWORD dwCipherSuite, LPCWSTR pszHashAlgId, DWORD dwFlags) #uselib "ncrypt.dll" #cfunc global SslCreateClientAuthHash "SslCreateClientAuthHash" intptr, var, int, int, wstr, int ; res = SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags) ; hSslProvider : NCRYPT_PROV_HANDLE -> "intptr" ; phHandshakeHash : NCRYPT_HASH_HANDLE* out -> "var" ; dwProtocol : DWORD -> "int" ; dwCipherSuite : DWORD -> "int" ; pszHashAlgId : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT SslCreateClientAuthHash(NCRYPT_PROV_HANDLE hSslProvider, NCRYPT_HASH_HANDLE* phHandshakeHash, DWORD dwProtocol, DWORD dwCipherSuite, LPCWSTR pszHashAlgId, DWORD dwFlags) #uselib "ncrypt.dll" #cfunc global SslCreateClientAuthHash "SslCreateClientAuthHash" intptr, intptr, int, int, wstr, int ; res = SslCreateClientAuthHash(hSslProvider, varptr(phHandshakeHash), dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags) ; hSslProvider : NCRYPT_PROV_HANDLE -> "intptr" ; phHandshakeHash : NCRYPT_HASH_HANDLE* out -> "intptr" ; dwProtocol : DWORD -> "int" ; dwCipherSuite : DWORD -> "int" ; pszHashAlgId : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
ncrypt = windows.NewLazySystemDLL("ncrypt.dll")
procSslCreateClientAuthHash = ncrypt.NewProc("SslCreateClientAuthHash")
)
// hSslProvider (NCRYPT_PROV_HANDLE), phHandshakeHash (NCRYPT_HASH_HANDLE* out), dwProtocol (DWORD), dwCipherSuite (DWORD), pszHashAlgId (LPCWSTR), dwFlags (DWORD)
r1, _, err := procSslCreateClientAuthHash.Call(
uintptr(hSslProvider),
uintptr(phHandshakeHash),
uintptr(dwProtocol),
uintptr(dwCipherSuite),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pszHashAlgId))),
uintptr(dwFlags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction SslCreateClientAuthHash(
hSslProvider: NativeUInt; // NCRYPT_PROV_HANDLE
phHandshakeHash: Pointer; // NCRYPT_HASH_HANDLE* out
dwProtocol: DWORD; // DWORD
dwCipherSuite: DWORD; // DWORD
pszHashAlgId: PWideChar; // LPCWSTR
dwFlags: DWORD // DWORD
): Integer; stdcall;
external 'ncrypt.dll' name 'SslCreateClientAuthHash';result := DllCall("ncrypt\SslCreateClientAuthHash"
, "UPtr", hSslProvider ; NCRYPT_PROV_HANDLE
, "Ptr", phHandshakeHash ; NCRYPT_HASH_HANDLE* out
, "UInt", dwProtocol ; DWORD
, "UInt", dwCipherSuite ; DWORD
, "WStr", pszHashAlgId ; LPCWSTR
, "UInt", dwFlags ; DWORD
, "Int") ; return: HRESULT●SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags) = DLL("ncrypt.dll", "int SslCreateClientAuthHash(int, void*, dword, dword, char*, dword)")
# 呼び出し: SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags)
# hSslProvider : NCRYPT_PROV_HANDLE -> "int"
# phHandshakeHash : NCRYPT_HASH_HANDLE* out -> "void*"
# dwProtocol : DWORD -> "dword"
# dwCipherSuite : DWORD -> "dword"
# pszHashAlgId : LPCWSTR -> "char*"
# dwFlags : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "ncrypt" fn SslCreateClientAuthHash(
hSslProvider: usize, // NCRYPT_PROV_HANDLE
phHandshakeHash: [*c]usize, // NCRYPT_HASH_HANDLE* out
dwProtocol: u32, // DWORD
dwCipherSuite: u32, // DWORD
pszHashAlgId: [*c]const u16, // LPCWSTR
dwFlags: u32 // DWORD
) callconv(std.os.windows.WINAPI) i32;proc SslCreateClientAuthHash(
hSslProvider: uint, # NCRYPT_PROV_HANDLE
phHandshakeHash: ptr uint, # NCRYPT_HASH_HANDLE* out
dwProtocol: uint32, # DWORD
dwCipherSuite: uint32, # DWORD
pszHashAlgId: WideCString, # LPCWSTR
dwFlags: uint32 # DWORD
): int32 {.importc: "SslCreateClientAuthHash", stdcall, dynlib: "ncrypt.dll".}pragma(lib, "ncrypt");
extern(Windows)
int SslCreateClientAuthHash(
size_t hSslProvider, // NCRYPT_PROV_HANDLE
size_t* phHandshakeHash, // NCRYPT_HASH_HANDLE* out
uint dwProtocol, // DWORD
uint dwCipherSuite, // DWORD
const(wchar)* pszHashAlgId, // LPCWSTR
uint dwFlags // DWORD
);ccall((:SslCreateClientAuthHash, "ncrypt.dll"), stdcall, Int32,
(Csize_t, Ptr{Csize_t}, UInt32, UInt32, Cwstring, UInt32),
hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags)
# hSslProvider : NCRYPT_PROV_HANDLE -> Csize_t
# phHandshakeHash : NCRYPT_HASH_HANDLE* out -> Ptr{Csize_t}
# dwProtocol : DWORD -> UInt32
# dwCipherSuite : DWORD -> UInt32
# pszHashAlgId : LPCWSTR -> Cwstring
# dwFlags : DWORD -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t SslCreateClientAuthHash(
uintptr_t hSslProvider,
uintptr_t* phHandshakeHash,
uint32_t dwProtocol,
uint32_t dwCipherSuite,
const uint16_t* pszHashAlgId,
uint32_t dwFlags);
]]
local ncrypt = ffi.load("ncrypt")
-- ncrypt.SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags)
-- hSslProvider : NCRYPT_PROV_HANDLE
-- phHandshakeHash : NCRYPT_HASH_HANDLE* out
-- dwProtocol : DWORD
-- dwCipherSuite : DWORD
-- pszHashAlgId : LPCWSTR
-- dwFlags : DWORD
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('ncrypt.dll');
const SslCreateClientAuthHash = lib.func('__stdcall', 'SslCreateClientAuthHash', 'int32_t', ['uintptr_t', 'uintptr_t *', 'uint32_t', 'uint32_t', 'str16', 'uint32_t']);
// SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags)
// hSslProvider : NCRYPT_PROV_HANDLE -> 'uintptr_t'
// phHandshakeHash : NCRYPT_HASH_HANDLE* out -> 'uintptr_t *'
// dwProtocol : DWORD -> 'uint32_t'
// dwCipherSuite : DWORD -> 'uint32_t'
// pszHashAlgId : LPCWSTR -> 'str16'
// dwFlags : DWORD -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("ncrypt.dll", {
SslCreateClientAuthHash: { parameters: ["usize", "pointer", "u32", "u32", "buffer", "u32"], result: "i32" },
});
// lib.symbols.SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags)
// hSslProvider : NCRYPT_PROV_HANDLE -> "usize"
// phHandshakeHash : NCRYPT_HASH_HANDLE* out -> "pointer"
// dwProtocol : DWORD -> "u32"
// dwCipherSuite : DWORD -> "u32"
// pszHashAlgId : LPCWSTR -> "buffer"
// dwFlags : DWORD -> "u32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t SslCreateClientAuthHash(
size_t hSslProvider,
size_t* phHandshakeHash,
uint32_t dwProtocol,
uint32_t dwCipherSuite,
const uint16_t* pszHashAlgId,
uint32_t dwFlags);
C, "ncrypt.dll");
// $ffi->SslCreateClientAuthHash(hSslProvider, phHandshakeHash, dwProtocol, dwCipherSuite, pszHashAlgId, dwFlags);
// hSslProvider : NCRYPT_PROV_HANDLE
// phHandshakeHash : NCRYPT_HASH_HANDLE* out
// dwProtocol : DWORD
// dwCipherSuite : DWORD
// pszHashAlgId : LPCWSTR
// dwFlags : DWORD
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Ncrypt extends StdCallLibrary {
Ncrypt INSTANCE = Native.load("ncrypt", Ncrypt.class);
int SslCreateClientAuthHash(
long hSslProvider, // NCRYPT_PROV_HANDLE
LongByReference phHandshakeHash, // NCRYPT_HASH_HANDLE* out
int dwProtocol, // DWORD
int dwCipherSuite, // DWORD
WString pszHashAlgId, // LPCWSTR
int dwFlags // DWORD
);
}@[Link("ncrypt")]
lib Libncrypt
fun SslCreateClientAuthHash = SslCreateClientAuthHash(
hSslProvider : LibC::SizeT, # NCRYPT_PROV_HANDLE
phHandshakeHash : LibC::SizeT*, # NCRYPT_HASH_HANDLE* out
dwProtocol : UInt32, # DWORD
dwCipherSuite : UInt32, # DWORD
pszHashAlgId : UInt16*, # LPCWSTR
dwFlags : UInt32 # DWORD
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef SslCreateClientAuthHashNative = Int32 Function(UintPtr, Pointer<UintPtr>, Uint32, Uint32, Pointer<Utf16>, Uint32);
typedef SslCreateClientAuthHashDart = int Function(int, Pointer<UintPtr>, int, int, Pointer<Utf16>, int);
final SslCreateClientAuthHash = DynamicLibrary.open('ncrypt.dll')
.lookupFunction<SslCreateClientAuthHashNative, SslCreateClientAuthHashDart>('SslCreateClientAuthHash');
// hSslProvider : NCRYPT_PROV_HANDLE -> UintPtr
// phHandshakeHash : NCRYPT_HASH_HANDLE* out -> Pointer<UintPtr>
// dwProtocol : DWORD -> Uint32
// dwCipherSuite : DWORD -> Uint32
// pszHashAlgId : LPCWSTR -> Pointer<Utf16>
// dwFlags : DWORD -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function SslCreateClientAuthHash(
hSslProvider: NativeUInt; // NCRYPT_PROV_HANDLE
phHandshakeHash: Pointer; // NCRYPT_HASH_HANDLE* out
dwProtocol: DWORD; // DWORD
dwCipherSuite: DWORD; // DWORD
pszHashAlgId: PWideChar; // LPCWSTR
dwFlags: DWORD // DWORD
): Integer; stdcall;
external 'ncrypt.dll' name 'SslCreateClientAuthHash';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "SslCreateClientAuthHash"
c_SslCreateClientAuthHash :: CUIntPtr -> Ptr CUIntPtr -> Word32 -> Word32 -> CWString -> Word32 -> IO Int32
-- hSslProvider : NCRYPT_PROV_HANDLE -> CUIntPtr
-- phHandshakeHash : NCRYPT_HASH_HANDLE* out -> Ptr CUIntPtr
-- dwProtocol : DWORD -> Word32
-- dwCipherSuite : DWORD -> Word32
-- pszHashAlgId : LPCWSTR -> CWString
-- dwFlags : DWORD -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let sslcreateclientauthhash =
foreign "SslCreateClientAuthHash"
(size_t @-> (ptr size_t) @-> uint32_t @-> uint32_t @-> (ptr uint16_t) @-> uint32_t @-> returning int32_t)
(* hSslProvider : NCRYPT_PROV_HANDLE -> size_t *)
(* phHandshakeHash : NCRYPT_HASH_HANDLE* out -> (ptr size_t) *)
(* dwProtocol : DWORD -> uint32_t *)
(* dwCipherSuite : DWORD -> uint32_t *)
(* pszHashAlgId : LPCWSTR -> (ptr uint16_t) *)
(* dwFlags : DWORD -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library ncrypt (t "ncrypt.dll"))
(cffi:use-foreign-library ncrypt)
(cffi:defcfun ("SslCreateClientAuthHash" ssl-create-client-auth-hash :convention :stdcall) :int32
(h-ssl-provider :uint64) ; NCRYPT_PROV_HANDLE
(ph-handshake-hash :pointer) ; NCRYPT_HASH_HANDLE* out
(dw-protocol :uint32) ; DWORD
(dw-cipher-suite :uint32) ; DWORD
(psz-hash-alg-id (:string :encoding :utf-16le)) ; LPCWSTR
(dw-flags :uint32)) ; DWORD
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $SslCreateClientAuthHash = Win32::API::More->new('ncrypt',
'int SslCreateClientAuthHash(WPARAM hSslProvider, LPVOID phHandshakeHash, DWORD dwProtocol, DWORD dwCipherSuite, LPCWSTR pszHashAlgId, DWORD dwFlags)');
# my $ret = $SslCreateClientAuthHash->Call($hSslProvider, $phHandshakeHash, $dwProtocol, $dwCipherSuite, $pszHashAlgId, $dwFlags);
# hSslProvider : NCRYPT_PROV_HANDLE -> WPARAM
# phHandshakeHash : NCRYPT_HASH_HANDLE* out -> LPVOID
# dwProtocol : DWORD -> DWORD
# dwCipherSuite : DWORD -> DWORD
# pszHashAlgId : LPCWSTR -> LPCWSTR
# dwFlags : DWORD -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。