Win32 API 日本語リファレンス
ホームSecurity.Cryptography › NCRYPT_SSL_FUNCTION_TABLE

NCRYPT_SSL_FUNCTION_TABLE

構造体
サイズx64: 336 バイト / x86: 168 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
VersionBCRYPT_INTERFACE_VERSION4+0+0SSLプロバイダーインターフェイスのバージョン。
ComputeClientAuthHashSslComputeClientAuthHashFn8/4+8+4クライアント認証ハッシュを計算する関数ポインタ。
ComputeEapKeyBlockSslComputeEapKeyBlockFn8/4+16+8EAP鍵ブロックを計算する関数ポインタ。
ComputeFinishedHashSslComputeFinishedHashFn8/4+24+12Finishedメッセージのハッシュを計算する関数ポインタ。
CreateEphemeralKeySslCreateEphemeralKeyFn8/4+32+16一時鍵を生成する関数ポインタ。
CreateHandshakeHashSslCreateHandshakeHashFn8/4+40+20ハンドシェイクハッシュを生成する関数ポインタ。
DecryptPacketSslDecryptPacketFn8/4+48+24パケットを復号する関数ポインタ。
EncryptPacketSslEncryptPacketFn8/4+56+28パケットを暗号化する関数ポインタ。
EnumCipherSuitesSslEnumCipherSuitesFn8/4+64+32暗号スイートを列挙する関数ポインタ。
ExportKeySslExportKeyFn8/4+72+36鍵をエクスポートする関数ポインタ。
FreeBufferSslFreeBufferFn8/4+80+40バッファを解放する関数ポインタ。
FreeObjectSslFreeObjectFn8/4+88+44オブジェクトを解放する関数ポインタ。
GenerateMasterKeySslGenerateMasterKeyFn8/4+96+48マスターキーを生成する関数ポインタ。
GenerateSessionKeysSslGenerateSessionKeysFn8/4+104+52セッション鍵を生成する関数ポインタ。
GetKeyPropertySslGetKeyPropertyFn8/4+112+56鍵プロパティを取得する関数ポインタ。
GetProviderPropertySslGetProviderPropertyFn8/4+120+60プロバイダープロパティを取得する関数ポインタ。
HashHandshakeSslHashHandshakeFn8/4+128+64ハンドシェイクメッセージをハッシュする関数ポインタ。
ImportMasterKeySslImportMasterKeyFn8/4+136+68マスターキーをインポートする関数ポインタ。
ImportKeySslImportKeyFn8/4+144+72鍵をインポートする関数ポインタ。
LookupCipherSuiteInfoSslLookupCipherSuiteInfoFn8/4+152+76暗号スイート情報を検索する関数ポインタ。
OpenPrivateKeySslOpenPrivateKeyFn8/4+160+80秘密鍵を開く関数ポインタ。
OpenProviderSslOpenProviderFn8/4+168+84プロバイダーを開く関数ポインタ。
SignHashSslSignHashFn8/4+176+88ハッシュに署名する関数ポインタ。
VerifySignatureSslVerifySignatureFn8/4+184+92署名を検証する関数ポインタ。
LookupCipherLengthsSslLookupCipherLengthsFn8/4+192+96暗号長情報を検索する関数ポインタ。
CreateClientAuthHashSslCreateClientAuthHashFn8/4+200+100クライアント認証ハッシュを生成する関数ポインタ。
GetCipherSuitePRFHashAlgorithmSslGetCipherSuitePRFHashAlgorithmFn8/4+208+104暗号スイートのPRFハッシュアルゴリズムを取得する関数ポインタ。
ComputeSessionHashSslComputeSessionHashFn8/4+216+108セッションハッシュを計算する関数ポインタ。
GeneratePreMasterKeySslGeneratePreMasterKeyFn8/4+224+112プリマスターキーを生成する関数ポインタ。
EnumEccCurvesSslEnumEccCurvesFn8/4+232+116ECC曲線を列挙する関数ポインタ。
ExportKeyingMaterialSslExportKeyingMaterialFn8/4+240+120鍵生成素材をエクスポートする関数ポインタ。
ExtractEarlyKeySslExtractEarlyKeyFn8/4+248+124TLS1.3のアーリーキーを抽出する関数ポインタ。
ExtractHandshakeKeySslExtractHandshakeKeyFn8/4+256+128TLS1.3のハンドシェイクキーを抽出する関数ポインタ。
ExtractMasterKeySslExtractMasterKeyFn8/4+264+132TLS1.3のマスターキーを抽出する関数ポインタ。
ExpandTrafficKeysSslExpandTrafficKeysFn8/4+272+136トラフィック鍵を展開する関数ポインタ。
ExpandWriteKeySslExpandWriteKeyFn8/4+280+140書き込み鍵を展開する関数ポインタ。
ExpandExporterMasterKeySslExpandExporterMasterKeyFn8/4+288+144エクスポーターマスターキーを展開する関数ポインタ。
EnumCipherSuitesExSslEnumCipherSuitesExFn8/4+296+148暗号スイートを拡張列挙する関数ポインタ。
ExpandResumptionMasterKeySslExpandResumptionMasterKeyFn8/4+304+152再開用マスターキーを展開する関数ポインタ。
DuplicateTranscriptHashSslDuplicateTranscriptHashFn8/4+312+156トランスクリプトハッシュを複製する関数ポインタ。
ExpandBinderKeySslExpandBinderKeyFn8/4+320+160バインダーキーを展開する関数ポインタ。
ExpandPreSharedKeySslExpandPreSharedKeyFn8/4+328+164事前共有鍵(PSK)を展開する関数ポインタ。

各言語での定義

#include <windows.h>

// BCRYPT_INTERFACE_VERSION  (x64 4 / x86 4 バイト)
typedef struct BCRYPT_INTERFACE_VERSION {
    WORD MajorVersion;
    WORD MinorVersion;
} BCRYPT_INTERFACE_VERSION;

// NCRYPT_SSL_FUNCTION_TABLE  (x64 336 / x86 168 バイト)
typedef struct NCRYPT_SSL_FUNCTION_TABLE {
    BCRYPT_INTERFACE_VERSION Version;
    SslComputeClientAuthHashFn ComputeClientAuthHash;
    SslComputeEapKeyBlockFn ComputeEapKeyBlock;
    SslComputeFinishedHashFn ComputeFinishedHash;
    SslCreateEphemeralKeyFn CreateEphemeralKey;
    SslCreateHandshakeHashFn CreateHandshakeHash;
    SslDecryptPacketFn DecryptPacket;
    SslEncryptPacketFn EncryptPacket;
    SslEnumCipherSuitesFn EnumCipherSuites;
    SslExportKeyFn ExportKey;
    SslFreeBufferFn FreeBuffer;
    SslFreeObjectFn FreeObject;
    SslGenerateMasterKeyFn GenerateMasterKey;
    SslGenerateSessionKeysFn GenerateSessionKeys;
    SslGetKeyPropertyFn GetKeyProperty;
    SslGetProviderPropertyFn GetProviderProperty;
    SslHashHandshakeFn HashHandshake;
    SslImportMasterKeyFn ImportMasterKey;
    SslImportKeyFn ImportKey;
    SslLookupCipherSuiteInfoFn LookupCipherSuiteInfo;
    SslOpenPrivateKeyFn OpenPrivateKey;
    SslOpenProviderFn OpenProvider;
    SslSignHashFn SignHash;
    SslVerifySignatureFn VerifySignature;
    SslLookupCipherLengthsFn LookupCipherLengths;
    SslCreateClientAuthHashFn CreateClientAuthHash;
    SslGetCipherSuitePRFHashAlgorithmFn GetCipherSuitePRFHashAlgorithm;
    SslComputeSessionHashFn ComputeSessionHash;
    SslGeneratePreMasterKeyFn GeneratePreMasterKey;
    SslEnumEccCurvesFn EnumEccCurves;
    SslExportKeyingMaterialFn ExportKeyingMaterial;
    SslExtractEarlyKeyFn ExtractEarlyKey;
    SslExtractHandshakeKeyFn ExtractHandshakeKey;
    SslExtractMasterKeyFn ExtractMasterKey;
    SslExpandTrafficKeysFn ExpandTrafficKeys;
    SslExpandWriteKeyFn ExpandWriteKey;
    SslExpandExporterMasterKeyFn ExpandExporterMasterKey;
    SslEnumCipherSuitesExFn EnumCipherSuitesEx;
    SslExpandResumptionMasterKeyFn ExpandResumptionMasterKey;
    SslDuplicateTranscriptHashFn DuplicateTranscriptHash;
    SslExpandBinderKeyFn ExpandBinderKey;
    SslExpandPreSharedKeyFn ExpandPreSharedKey;
} NCRYPT_SSL_FUNCTION_TABLE;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct BCRYPT_INTERFACE_VERSION
{
    public ushort MajorVersion;
    public ushort MinorVersion;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NCRYPT_SSL_FUNCTION_TABLE
{
    public BCRYPT_INTERFACE_VERSION Version;
    public IntPtr ComputeClientAuthHash;
    public IntPtr ComputeEapKeyBlock;
    public IntPtr ComputeFinishedHash;
    public IntPtr CreateEphemeralKey;
    public IntPtr CreateHandshakeHash;
    public IntPtr DecryptPacket;
    public IntPtr EncryptPacket;
    public IntPtr EnumCipherSuites;
    public IntPtr ExportKey;
    public IntPtr FreeBuffer;
    public IntPtr FreeObject;
    public IntPtr GenerateMasterKey;
    public IntPtr GenerateSessionKeys;
    public IntPtr GetKeyProperty;
    public IntPtr GetProviderProperty;
    public IntPtr HashHandshake;
    public IntPtr ImportMasterKey;
    public IntPtr ImportKey;
    public IntPtr LookupCipherSuiteInfo;
    public IntPtr OpenPrivateKey;
    public IntPtr OpenProvider;
    public IntPtr SignHash;
    public IntPtr VerifySignature;
    public IntPtr LookupCipherLengths;
    public IntPtr CreateClientAuthHash;
    public IntPtr GetCipherSuitePRFHashAlgorithm;
    public IntPtr ComputeSessionHash;
    public IntPtr GeneratePreMasterKey;
    public IntPtr EnumEccCurves;
    public IntPtr ExportKeyingMaterial;
    public IntPtr ExtractEarlyKey;
    public IntPtr ExtractHandshakeKey;
    public IntPtr ExtractMasterKey;
    public IntPtr ExpandTrafficKeys;
    public IntPtr ExpandWriteKey;
    public IntPtr ExpandExporterMasterKey;
    public IntPtr EnumCipherSuitesEx;
    public IntPtr ExpandResumptionMasterKey;
    public IntPtr DuplicateTranscriptHash;
    public IntPtr ExpandBinderKey;
    public IntPtr ExpandPreSharedKey;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure BCRYPT_INTERFACE_VERSION
    Public MajorVersion As UShort
    Public MinorVersion As UShort
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NCRYPT_SSL_FUNCTION_TABLE
    Public Version As BCRYPT_INTERFACE_VERSION
    Public ComputeClientAuthHash As IntPtr
    Public ComputeEapKeyBlock As IntPtr
    Public ComputeFinishedHash As IntPtr
    Public CreateEphemeralKey As IntPtr
    Public CreateHandshakeHash As IntPtr
    Public DecryptPacket As IntPtr
    Public EncryptPacket As IntPtr
    Public EnumCipherSuites As IntPtr
    Public ExportKey As IntPtr
    Public FreeBuffer As IntPtr
    Public FreeObject As IntPtr
    Public GenerateMasterKey As IntPtr
    Public GenerateSessionKeys As IntPtr
    Public GetKeyProperty As IntPtr
    Public GetProviderProperty As IntPtr
    Public HashHandshake As IntPtr
    Public ImportMasterKey As IntPtr
    Public ImportKey As IntPtr
    Public LookupCipherSuiteInfo As IntPtr
    Public OpenPrivateKey As IntPtr
    Public OpenProvider As IntPtr
    Public SignHash As IntPtr
    Public VerifySignature As IntPtr
    Public LookupCipherLengths As IntPtr
    Public CreateClientAuthHash As IntPtr
    Public GetCipherSuitePRFHashAlgorithm As IntPtr
    Public ComputeSessionHash As IntPtr
    Public GeneratePreMasterKey As IntPtr
    Public EnumEccCurves As IntPtr
    Public ExportKeyingMaterial As IntPtr
    Public ExtractEarlyKey As IntPtr
    Public ExtractHandshakeKey As IntPtr
    Public ExtractMasterKey As IntPtr
    Public ExpandTrafficKeys As IntPtr
    Public ExpandWriteKey As IntPtr
    Public ExpandExporterMasterKey As IntPtr
    Public EnumCipherSuitesEx As IntPtr
    Public ExpandResumptionMasterKey As IntPtr
    Public DuplicateTranscriptHash As IntPtr
    Public ExpandBinderKey As IntPtr
    Public ExpandPreSharedKey As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class BCRYPT_INTERFACE_VERSION(ctypes.Structure):
    _fields_ = [
        ("MajorVersion", ctypes.c_ushort),
        ("MinorVersion", ctypes.c_ushort),
    ]

class NCRYPT_SSL_FUNCTION_TABLE(ctypes.Structure):
    _fields_ = [
        ("Version", BCRYPT_INTERFACE_VERSION),
        ("ComputeClientAuthHash", ctypes.c_void_p),
        ("ComputeEapKeyBlock", ctypes.c_void_p),
        ("ComputeFinishedHash", ctypes.c_void_p),
        ("CreateEphemeralKey", ctypes.c_void_p),
        ("CreateHandshakeHash", ctypes.c_void_p),
        ("DecryptPacket", ctypes.c_void_p),
        ("EncryptPacket", ctypes.c_void_p),
        ("EnumCipherSuites", ctypes.c_void_p),
        ("ExportKey", ctypes.c_void_p),
        ("FreeBuffer", ctypes.c_void_p),
        ("FreeObject", ctypes.c_void_p),
        ("GenerateMasterKey", ctypes.c_void_p),
        ("GenerateSessionKeys", ctypes.c_void_p),
        ("GetKeyProperty", ctypes.c_void_p),
        ("GetProviderProperty", ctypes.c_void_p),
        ("HashHandshake", ctypes.c_void_p),
        ("ImportMasterKey", ctypes.c_void_p),
        ("ImportKey", ctypes.c_void_p),
        ("LookupCipherSuiteInfo", ctypes.c_void_p),
        ("OpenPrivateKey", ctypes.c_void_p),
        ("OpenProvider", ctypes.c_void_p),
        ("SignHash", ctypes.c_void_p),
        ("VerifySignature", ctypes.c_void_p),
        ("LookupCipherLengths", ctypes.c_void_p),
        ("CreateClientAuthHash", ctypes.c_void_p),
        ("GetCipherSuitePRFHashAlgorithm", ctypes.c_void_p),
        ("ComputeSessionHash", ctypes.c_void_p),
        ("GeneratePreMasterKey", ctypes.c_void_p),
        ("EnumEccCurves", ctypes.c_void_p),
        ("ExportKeyingMaterial", ctypes.c_void_p),
        ("ExtractEarlyKey", ctypes.c_void_p),
        ("ExtractHandshakeKey", ctypes.c_void_p),
        ("ExtractMasterKey", ctypes.c_void_p),
        ("ExpandTrafficKeys", ctypes.c_void_p),
        ("ExpandWriteKey", ctypes.c_void_p),
        ("ExpandExporterMasterKey", ctypes.c_void_p),
        ("EnumCipherSuitesEx", ctypes.c_void_p),
        ("ExpandResumptionMasterKey", ctypes.c_void_p),
        ("DuplicateTranscriptHash", ctypes.c_void_p),
        ("ExpandBinderKey", ctypes.c_void_p),
        ("ExpandPreSharedKey", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct BCRYPT_INTERFACE_VERSION {
    pub MajorVersion: u16,
    pub MinorVersion: u16,
}

#[repr(C)]
pub struct NCRYPT_SSL_FUNCTION_TABLE {
    pub Version: BCRYPT_INTERFACE_VERSION,
    pub ComputeClientAuthHash: *mut core::ffi::c_void,
    pub ComputeEapKeyBlock: *mut core::ffi::c_void,
    pub ComputeFinishedHash: *mut core::ffi::c_void,
    pub CreateEphemeralKey: *mut core::ffi::c_void,
    pub CreateHandshakeHash: *mut core::ffi::c_void,
    pub DecryptPacket: *mut core::ffi::c_void,
    pub EncryptPacket: *mut core::ffi::c_void,
    pub EnumCipherSuites: *mut core::ffi::c_void,
    pub ExportKey: *mut core::ffi::c_void,
    pub FreeBuffer: *mut core::ffi::c_void,
    pub FreeObject: *mut core::ffi::c_void,
    pub GenerateMasterKey: *mut core::ffi::c_void,
    pub GenerateSessionKeys: *mut core::ffi::c_void,
    pub GetKeyProperty: *mut core::ffi::c_void,
    pub GetProviderProperty: *mut core::ffi::c_void,
    pub HashHandshake: *mut core::ffi::c_void,
    pub ImportMasterKey: *mut core::ffi::c_void,
    pub ImportKey: *mut core::ffi::c_void,
    pub LookupCipherSuiteInfo: *mut core::ffi::c_void,
    pub OpenPrivateKey: *mut core::ffi::c_void,
    pub OpenProvider: *mut core::ffi::c_void,
    pub SignHash: *mut core::ffi::c_void,
    pub VerifySignature: *mut core::ffi::c_void,
    pub LookupCipherLengths: *mut core::ffi::c_void,
    pub CreateClientAuthHash: *mut core::ffi::c_void,
    pub GetCipherSuitePRFHashAlgorithm: *mut core::ffi::c_void,
    pub ComputeSessionHash: *mut core::ffi::c_void,
    pub GeneratePreMasterKey: *mut core::ffi::c_void,
    pub EnumEccCurves: *mut core::ffi::c_void,
    pub ExportKeyingMaterial: *mut core::ffi::c_void,
    pub ExtractEarlyKey: *mut core::ffi::c_void,
    pub ExtractHandshakeKey: *mut core::ffi::c_void,
    pub ExtractMasterKey: *mut core::ffi::c_void,
    pub ExpandTrafficKeys: *mut core::ffi::c_void,
    pub ExpandWriteKey: *mut core::ffi::c_void,
    pub ExpandExporterMasterKey: *mut core::ffi::c_void,
    pub EnumCipherSuitesEx: *mut core::ffi::c_void,
    pub ExpandResumptionMasterKey: *mut core::ffi::c_void,
    pub DuplicateTranscriptHash: *mut core::ffi::c_void,
    pub ExpandBinderKey: *mut core::ffi::c_void,
    pub ExpandPreSharedKey: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type BCRYPT_INTERFACE_VERSION struct {
	MajorVersion uint16
	MinorVersion uint16
}

type NCRYPT_SSL_FUNCTION_TABLE struct {
	Version BCRYPT_INTERFACE_VERSION
	ComputeClientAuthHash uintptr
	ComputeEapKeyBlock uintptr
	ComputeFinishedHash uintptr
	CreateEphemeralKey uintptr
	CreateHandshakeHash uintptr
	DecryptPacket uintptr
	EncryptPacket uintptr
	EnumCipherSuites uintptr
	ExportKey uintptr
	FreeBuffer uintptr
	FreeObject uintptr
	GenerateMasterKey uintptr
	GenerateSessionKeys uintptr
	GetKeyProperty uintptr
	GetProviderProperty uintptr
	HashHandshake uintptr
	ImportMasterKey uintptr
	ImportKey uintptr
	LookupCipherSuiteInfo uintptr
	OpenPrivateKey uintptr
	OpenProvider uintptr
	SignHash uintptr
	VerifySignature uintptr
	LookupCipherLengths uintptr
	CreateClientAuthHash uintptr
	GetCipherSuitePRFHashAlgorithm uintptr
	ComputeSessionHash uintptr
	GeneratePreMasterKey uintptr
	EnumEccCurves uintptr
	ExportKeyingMaterial uintptr
	ExtractEarlyKey uintptr
	ExtractHandshakeKey uintptr
	ExtractMasterKey uintptr
	ExpandTrafficKeys uintptr
	ExpandWriteKey uintptr
	ExpandExporterMasterKey uintptr
	EnumCipherSuitesEx uintptr
	ExpandResumptionMasterKey uintptr
	DuplicateTranscriptHash uintptr
	ExpandBinderKey uintptr
	ExpandPreSharedKey uintptr
}
type
  BCRYPT_INTERFACE_VERSION = record
    MajorVersion: Word;
    MinorVersion: Word;
  end;

  NCRYPT_SSL_FUNCTION_TABLE = record
    Version: BCRYPT_INTERFACE_VERSION;
    ComputeClientAuthHash: Pointer;
    ComputeEapKeyBlock: Pointer;
    ComputeFinishedHash: Pointer;
    CreateEphemeralKey: Pointer;
    CreateHandshakeHash: Pointer;
    DecryptPacket: Pointer;
    EncryptPacket: Pointer;
    EnumCipherSuites: Pointer;
    ExportKey: Pointer;
    FreeBuffer: Pointer;
    FreeObject: Pointer;
    GenerateMasterKey: Pointer;
    GenerateSessionKeys: Pointer;
    GetKeyProperty: Pointer;
    GetProviderProperty: Pointer;
    HashHandshake: Pointer;
    ImportMasterKey: Pointer;
    ImportKey: Pointer;
    LookupCipherSuiteInfo: Pointer;
    OpenPrivateKey: Pointer;
    OpenProvider: Pointer;
    SignHash: Pointer;
    VerifySignature: Pointer;
    LookupCipherLengths: Pointer;
    CreateClientAuthHash: Pointer;
    GetCipherSuitePRFHashAlgorithm: Pointer;
    ComputeSessionHash: Pointer;
    GeneratePreMasterKey: Pointer;
    EnumEccCurves: Pointer;
    ExportKeyingMaterial: Pointer;
    ExtractEarlyKey: Pointer;
    ExtractHandshakeKey: Pointer;
    ExtractMasterKey: Pointer;
    ExpandTrafficKeys: Pointer;
    ExpandWriteKey: Pointer;
    ExpandExporterMasterKey: Pointer;
    EnumCipherSuitesEx: Pointer;
    ExpandResumptionMasterKey: Pointer;
    DuplicateTranscriptHash: Pointer;
    ExpandBinderKey: Pointer;
    ExpandPreSharedKey: Pointer;
  end;
const BCRYPT_INTERFACE_VERSION = extern struct {
    MajorVersion: u16,
    MinorVersion: u16,
};

const NCRYPT_SSL_FUNCTION_TABLE = extern struct {
    Version: BCRYPT_INTERFACE_VERSION,
    ComputeClientAuthHash: ?*anyopaque,
    ComputeEapKeyBlock: ?*anyopaque,
    ComputeFinishedHash: ?*anyopaque,
    CreateEphemeralKey: ?*anyopaque,
    CreateHandshakeHash: ?*anyopaque,
    DecryptPacket: ?*anyopaque,
    EncryptPacket: ?*anyopaque,
    EnumCipherSuites: ?*anyopaque,
    ExportKey: ?*anyopaque,
    FreeBuffer: ?*anyopaque,
    FreeObject: ?*anyopaque,
    GenerateMasterKey: ?*anyopaque,
    GenerateSessionKeys: ?*anyopaque,
    GetKeyProperty: ?*anyopaque,
    GetProviderProperty: ?*anyopaque,
    HashHandshake: ?*anyopaque,
    ImportMasterKey: ?*anyopaque,
    ImportKey: ?*anyopaque,
    LookupCipherSuiteInfo: ?*anyopaque,
    OpenPrivateKey: ?*anyopaque,
    OpenProvider: ?*anyopaque,
    SignHash: ?*anyopaque,
    VerifySignature: ?*anyopaque,
    LookupCipherLengths: ?*anyopaque,
    CreateClientAuthHash: ?*anyopaque,
    GetCipherSuitePRFHashAlgorithm: ?*anyopaque,
    ComputeSessionHash: ?*anyopaque,
    GeneratePreMasterKey: ?*anyopaque,
    EnumEccCurves: ?*anyopaque,
    ExportKeyingMaterial: ?*anyopaque,
    ExtractEarlyKey: ?*anyopaque,
    ExtractHandshakeKey: ?*anyopaque,
    ExtractMasterKey: ?*anyopaque,
    ExpandTrafficKeys: ?*anyopaque,
    ExpandWriteKey: ?*anyopaque,
    ExpandExporterMasterKey: ?*anyopaque,
    EnumCipherSuitesEx: ?*anyopaque,
    ExpandResumptionMasterKey: ?*anyopaque,
    DuplicateTranscriptHash: ?*anyopaque,
    ExpandBinderKey: ?*anyopaque,
    ExpandPreSharedKey: ?*anyopaque,
};
type
  BCRYPT_INTERFACE_VERSION {.bycopy.} = object
    MajorVersion: uint16
    MinorVersion: uint16

  NCRYPT_SSL_FUNCTION_TABLE {.bycopy.} = object
    Version: BCRYPT_INTERFACE_VERSION
    ComputeClientAuthHash: pointer
    ComputeEapKeyBlock: pointer
    ComputeFinishedHash: pointer
    CreateEphemeralKey: pointer
    CreateHandshakeHash: pointer
    DecryptPacket: pointer
    EncryptPacket: pointer
    EnumCipherSuites: pointer
    ExportKey: pointer
    FreeBuffer: pointer
    FreeObject: pointer
    GenerateMasterKey: pointer
    GenerateSessionKeys: pointer
    GetKeyProperty: pointer
    GetProviderProperty: pointer
    HashHandshake: pointer
    ImportMasterKey: pointer
    ImportKey: pointer
    LookupCipherSuiteInfo: pointer
    OpenPrivateKey: pointer
    OpenProvider: pointer
    SignHash: pointer
    VerifySignature: pointer
    LookupCipherLengths: pointer
    CreateClientAuthHash: pointer
    GetCipherSuitePRFHashAlgorithm: pointer
    ComputeSessionHash: pointer
    GeneratePreMasterKey: pointer
    EnumEccCurves: pointer
    ExportKeyingMaterial: pointer
    ExtractEarlyKey: pointer
    ExtractHandshakeKey: pointer
    ExtractMasterKey: pointer
    ExpandTrafficKeys: pointer
    ExpandWriteKey: pointer
    ExpandExporterMasterKey: pointer
    EnumCipherSuitesEx: pointer
    ExpandResumptionMasterKey: pointer
    DuplicateTranscriptHash: pointer
    ExpandBinderKey: pointer
    ExpandPreSharedKey: pointer
struct BCRYPT_INTERFACE_VERSION
{
    ushort MajorVersion;
    ushort MinorVersion;
}

struct NCRYPT_SSL_FUNCTION_TABLE
{
    BCRYPT_INTERFACE_VERSION Version;
    void* ComputeClientAuthHash;
    void* ComputeEapKeyBlock;
    void* ComputeFinishedHash;
    void* CreateEphemeralKey;
    void* CreateHandshakeHash;
    void* DecryptPacket;
    void* EncryptPacket;
    void* EnumCipherSuites;
    void* ExportKey;
    void* FreeBuffer;
    void* FreeObject;
    void* GenerateMasterKey;
    void* GenerateSessionKeys;
    void* GetKeyProperty;
    void* GetProviderProperty;
    void* HashHandshake;
    void* ImportMasterKey;
    void* ImportKey;
    void* LookupCipherSuiteInfo;
    void* OpenPrivateKey;
    void* OpenProvider;
    void* SignHash;
    void* VerifySignature;
    void* LookupCipherLengths;
    void* CreateClientAuthHash;
    void* GetCipherSuitePRFHashAlgorithm;
    void* ComputeSessionHash;
    void* GeneratePreMasterKey;
    void* EnumEccCurves;
    void* ExportKeyingMaterial;
    void* ExtractEarlyKey;
    void* ExtractHandshakeKey;
    void* ExtractMasterKey;
    void* ExpandTrafficKeys;
    void* ExpandWriteKey;
    void* ExpandExporterMasterKey;
    void* EnumCipherSuitesEx;
    void* ExpandResumptionMasterKey;
    void* DuplicateTranscriptHash;
    void* ExpandBinderKey;
    void* ExpandPreSharedKey;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; NCRYPT_SSL_FUNCTION_TABLE サイズ: 168 バイト(x86)
dim st, 42    ; 4byte整数×42(構造体サイズ 168 / 4 切り上げ)
; Version : BCRYPT_INTERFACE_VERSION (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; ComputeClientAuthHash : SslComputeClientAuthHashFn (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; ComputeEapKeyBlock : SslComputeEapKeyBlockFn (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ComputeFinishedHash : SslComputeFinishedHashFn (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; CreateEphemeralKey : SslCreateEphemeralKeyFn (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; CreateHandshakeHash : SslCreateHandshakeHashFn (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; DecryptPacket : SslDecryptPacketFn (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; EncryptPacket : SslEncryptPacketFn (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; EnumCipherSuites : SslEnumCipherSuitesFn (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ExportKey : SslExportKeyFn (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; FreeBuffer : SslFreeBufferFn (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; FreeObject : SslFreeObjectFn (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; GenerateMasterKey : SslGenerateMasterKeyFn (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; GenerateSessionKeys : SslGenerateSessionKeysFn (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; GetKeyProperty : SslGetKeyPropertyFn (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; GetProviderProperty : SslGetProviderPropertyFn (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; HashHandshake : SslHashHandshakeFn (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; ImportMasterKey : SslImportMasterKeyFn (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; ImportKey : SslImportKeyFn (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; LookupCipherSuiteInfo : SslLookupCipherSuiteInfoFn (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; OpenPrivateKey : SslOpenPrivateKeyFn (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; OpenProvider : SslOpenProviderFn (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; SignHash : SslSignHashFn (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; VerifySignature : SslVerifySignatureFn (+92, 4byte)  st.23 = 値  /  値 = st.23   (lpoke/lpeek も可)
; LookupCipherLengths : SslLookupCipherLengthsFn (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; CreateClientAuthHash : SslCreateClientAuthHashFn (+100, 4byte)  st.25 = 値  /  値 = st.25   (lpoke/lpeek も可)
; GetCipherSuitePRFHashAlgorithm : SslGetCipherSuitePRFHashAlgorithmFn (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; ComputeSessionHash : SslComputeSessionHashFn (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; GeneratePreMasterKey : SslGeneratePreMasterKeyFn (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; EnumEccCurves : SslEnumEccCurvesFn (+116, 4byte)  st.29 = 値  /  値 = st.29   (lpoke/lpeek も可)
; ExportKeyingMaterial : SslExportKeyingMaterialFn (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; ExtractEarlyKey : SslExtractEarlyKeyFn (+124, 4byte)  st.31 = 値  /  値 = st.31   (lpoke/lpeek も可)
; ExtractHandshakeKey : SslExtractHandshakeKeyFn (+128, 4byte)  st.32 = 値  /  値 = st.32   (lpoke/lpeek も可)
; ExtractMasterKey : SslExtractMasterKeyFn (+132, 4byte)  st.33 = 値  /  値 = st.33   (lpoke/lpeek も可)
; ExpandTrafficKeys : SslExpandTrafficKeysFn (+136, 4byte)  st.34 = 値  /  値 = st.34   (lpoke/lpeek も可)
; ExpandWriteKey : SslExpandWriteKeyFn (+140, 4byte)  st.35 = 値  /  値 = st.35   (lpoke/lpeek も可)
; ExpandExporterMasterKey : SslExpandExporterMasterKeyFn (+144, 4byte)  st.36 = 値  /  値 = st.36   (lpoke/lpeek も可)
; EnumCipherSuitesEx : SslEnumCipherSuitesExFn (+148, 4byte)  st.37 = 値  /  値 = st.37   (lpoke/lpeek も可)
; ExpandResumptionMasterKey : SslExpandResumptionMasterKeyFn (+152, 4byte)  st.38 = 値  /  値 = st.38   (lpoke/lpeek も可)
; DuplicateTranscriptHash : SslDuplicateTranscriptHashFn (+156, 4byte)  st.39 = 値  /  値 = st.39   (lpoke/lpeek も可)
; ExpandBinderKey : SslExpandBinderKeyFn (+160, 4byte)  st.40 = 値  /  値 = st.40   (lpoke/lpeek も可)
; ExpandPreSharedKey : SslExpandPreSharedKeyFn (+164, 4byte)  st.41 = 値  /  値 = st.41   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NCRYPT_SSL_FUNCTION_TABLE サイズ: 336 バイト(x64)
dim st, 84    ; 4byte整数×84(構造体サイズ 336 / 4 切り上げ)
; Version : BCRYPT_INTERFACE_VERSION (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; ComputeClientAuthHash : SslComputeClientAuthHashFn (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ComputeEapKeyBlock : SslComputeEapKeyBlockFn (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ComputeFinishedHash : SslComputeFinishedHashFn (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; CreateEphemeralKey : SslCreateEphemeralKeyFn (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; CreateHandshakeHash : SslCreateHandshakeHashFn (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; DecryptPacket : SslDecryptPacketFn (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; EncryptPacket : SslEncryptPacketFn (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; EnumCipherSuites : SslEnumCipherSuitesFn (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ExportKey : SslExportKeyFn (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; FreeBuffer : SslFreeBufferFn (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; FreeObject : SslFreeObjectFn (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; GenerateMasterKey : SslGenerateMasterKeyFn (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; GenerateSessionKeys : SslGenerateSessionKeysFn (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; GetKeyProperty : SslGetKeyPropertyFn (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; GetProviderProperty : SslGetProviderPropertyFn (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; HashHandshake : SslHashHandshakeFn (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; ImportMasterKey : SslImportMasterKeyFn (+136, 8byte)  qpoke st,136,値 / qpeek(st,136)  ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; ImportKey : SslImportKeyFn (+144, 8byte)  qpoke st,144,値 / qpeek(st,144)  ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; LookupCipherSuiteInfo : SslLookupCipherSuiteInfoFn (+152, 8byte)  qpoke st,152,値 / qpeek(st,152)  ※IronHSPのみ。3.7/3.8は lpoke st,152,下位 : lpoke st,156,上位
; OpenPrivateKey : SslOpenPrivateKeyFn (+160, 8byte)  qpoke st,160,値 / qpeek(st,160)  ※IronHSPのみ。3.7/3.8は lpoke st,160,下位 : lpoke st,164,上位
; OpenProvider : SslOpenProviderFn (+168, 8byte)  qpoke st,168,値 / qpeek(st,168)  ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; SignHash : SslSignHashFn (+176, 8byte)  qpoke st,176,値 / qpeek(st,176)  ※IronHSPのみ。3.7/3.8は lpoke st,176,下位 : lpoke st,180,上位
; VerifySignature : SslVerifySignatureFn (+184, 8byte)  qpoke st,184,値 / qpeek(st,184)  ※IronHSPのみ。3.7/3.8は lpoke st,184,下位 : lpoke st,188,上位
; LookupCipherLengths : SslLookupCipherLengthsFn (+192, 8byte)  qpoke st,192,値 / qpeek(st,192)  ※IronHSPのみ。3.7/3.8は lpoke st,192,下位 : lpoke st,196,上位
; CreateClientAuthHash : SslCreateClientAuthHashFn (+200, 8byte)  qpoke st,200,値 / qpeek(st,200)  ※IronHSPのみ。3.7/3.8は lpoke st,200,下位 : lpoke st,204,上位
; GetCipherSuitePRFHashAlgorithm : SslGetCipherSuitePRFHashAlgorithmFn (+208, 8byte)  qpoke st,208,値 / qpeek(st,208)  ※IronHSPのみ。3.7/3.8は lpoke st,208,下位 : lpoke st,212,上位
; ComputeSessionHash : SslComputeSessionHashFn (+216, 8byte)  qpoke st,216,値 / qpeek(st,216)  ※IronHSPのみ。3.7/3.8は lpoke st,216,下位 : lpoke st,220,上位
; GeneratePreMasterKey : SslGeneratePreMasterKeyFn (+224, 8byte)  qpoke st,224,値 / qpeek(st,224)  ※IronHSPのみ。3.7/3.8は lpoke st,224,下位 : lpoke st,228,上位
; EnumEccCurves : SslEnumEccCurvesFn (+232, 8byte)  qpoke st,232,値 / qpeek(st,232)  ※IronHSPのみ。3.7/3.8は lpoke st,232,下位 : lpoke st,236,上位
; ExportKeyingMaterial : SslExportKeyingMaterialFn (+240, 8byte)  qpoke st,240,値 / qpeek(st,240)  ※IronHSPのみ。3.7/3.8は lpoke st,240,下位 : lpoke st,244,上位
; ExtractEarlyKey : SslExtractEarlyKeyFn (+248, 8byte)  qpoke st,248,値 / qpeek(st,248)  ※IronHSPのみ。3.7/3.8は lpoke st,248,下位 : lpoke st,252,上位
; ExtractHandshakeKey : SslExtractHandshakeKeyFn (+256, 8byte)  qpoke st,256,値 / qpeek(st,256)  ※IronHSPのみ。3.7/3.8は lpoke st,256,下位 : lpoke st,260,上位
; ExtractMasterKey : SslExtractMasterKeyFn (+264, 8byte)  qpoke st,264,値 / qpeek(st,264)  ※IronHSPのみ。3.7/3.8は lpoke st,264,下位 : lpoke st,268,上位
; ExpandTrafficKeys : SslExpandTrafficKeysFn (+272, 8byte)  qpoke st,272,値 / qpeek(st,272)  ※IronHSPのみ。3.7/3.8は lpoke st,272,下位 : lpoke st,276,上位
; ExpandWriteKey : SslExpandWriteKeyFn (+280, 8byte)  qpoke st,280,値 / qpeek(st,280)  ※IronHSPのみ。3.7/3.8は lpoke st,280,下位 : lpoke st,284,上位
; ExpandExporterMasterKey : SslExpandExporterMasterKeyFn (+288, 8byte)  qpoke st,288,値 / qpeek(st,288)  ※IronHSPのみ。3.7/3.8は lpoke st,288,下位 : lpoke st,292,上位
; EnumCipherSuitesEx : SslEnumCipherSuitesExFn (+296, 8byte)  qpoke st,296,値 / qpeek(st,296)  ※IronHSPのみ。3.7/3.8は lpoke st,296,下位 : lpoke st,300,上位
; ExpandResumptionMasterKey : SslExpandResumptionMasterKeyFn (+304, 8byte)  qpoke st,304,値 / qpeek(st,304)  ※IronHSPのみ。3.7/3.8は lpoke st,304,下位 : lpoke st,308,上位
; DuplicateTranscriptHash : SslDuplicateTranscriptHashFn (+312, 8byte)  qpoke st,312,値 / qpeek(st,312)  ※IronHSPのみ。3.7/3.8は lpoke st,312,下位 : lpoke st,316,上位
; ExpandBinderKey : SslExpandBinderKeyFn (+320, 8byte)  qpoke st,320,値 / qpeek(st,320)  ※IronHSPのみ。3.7/3.8は lpoke st,320,下位 : lpoke st,324,上位
; ExpandPreSharedKey : SslExpandPreSharedKeyFn (+328, 8byte)  qpoke st,328,値 / qpeek(st,328)  ※IronHSPのみ。3.7/3.8は lpoke st,328,下位 : lpoke st,332,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global BCRYPT_INTERFACE_VERSION
    #field short MajorVersion
    #field short MinorVersion
#endstruct

#defstruct global NCRYPT_SSL_FUNCTION_TABLE
    #field BCRYPT_INTERFACE_VERSION Version
    #field intptr ComputeClientAuthHash
    #field intptr ComputeEapKeyBlock
    #field intptr ComputeFinishedHash
    #field intptr CreateEphemeralKey
    #field intptr CreateHandshakeHash
    #field intptr DecryptPacket
    #field intptr EncryptPacket
    #field intptr EnumCipherSuites
    #field intptr ExportKey
    #field intptr FreeBuffer
    #field intptr FreeObject
    #field intptr GenerateMasterKey
    #field intptr GenerateSessionKeys
    #field intptr GetKeyProperty
    #field intptr GetProviderProperty
    #field intptr HashHandshake
    #field intptr ImportMasterKey
    #field intptr ImportKey
    #field intptr LookupCipherSuiteInfo
    #field intptr OpenPrivateKey
    #field intptr OpenProvider
    #field intptr SignHash
    #field intptr VerifySignature
    #field intptr LookupCipherLengths
    #field intptr CreateClientAuthHash
    #field intptr GetCipherSuitePRFHashAlgorithm
    #field intptr ComputeSessionHash
    #field intptr GeneratePreMasterKey
    #field intptr EnumEccCurves
    #field intptr ExportKeyingMaterial
    #field intptr ExtractEarlyKey
    #field intptr ExtractHandshakeKey
    #field intptr ExtractMasterKey
    #field intptr ExpandTrafficKeys
    #field intptr ExpandWriteKey
    #field intptr ExpandExporterMasterKey
    #field intptr EnumCipherSuitesEx
    #field intptr ExpandResumptionMasterKey
    #field intptr DuplicateTranscriptHash
    #field intptr ExpandBinderKey
    #field intptr ExpandPreSharedKey
#endstruct

stdim st, NCRYPT_SSL_FUNCTION_TABLE        ; NSTRUCT 変数を確保