Win32 API 日本語リファレンス
ホームSecurity.Authentication.WebAuthn › WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST

WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST

構造体
サイズx64: 200 バイト / x86: 128 バイト

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

フィールド

フィールドサイズx64x86説明
dwVersionDWORD4+0+0この構造体のバージョン番号を示す。
cbRpIdDWORD4+4+4RP IDのバイト数を示す。
pbRpIdBYTE*8/4+8+8信頼当事者(RP)IDのバイト列へのポインタ。
cbClientDataHashDWORD4+16+12クライアントデータハッシュのバイト数を示す。
pbClientDataHashBYTE*8/4+24+16クライアントデータのハッシュへのポインタ。
pRpInformationWEBAUTHN_RP_ENTITY_INFORMATION*8/4+32+20RPエンティティ情報へのポインタ。
pUserInformationWEBAUTHN_USER_ENTITY_INFORMATION*8/4+40+24ユーザーエンティティ情報へのポインタ。
WebAuthNCredentialParametersWEBAUTHN_COSE_CREDENTIAL_PARAMETERS16/8+48+28許可する資格情報パラメータ(COSE)の集合を保持する。
CredentialListWEBAUTHN_CREDENTIAL_LIST16/8+64+36除外する資格情報の一覧を保持する。
cbCborExtensionsMapDWORD4+80+44CBOR拡張マップのバイト数を示す。
pbCborExtensionsMapBYTE*8/4+88+48CBORエンコードされた拡張マップへのポインタ。
pAuthenticatorOptionsWEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS*8/4+96+52認証器オプションへのポインタ。
fEmptyPinAuthBOOL4+104+56空のpinAuthを使用するかを示すブール値。
cbPinAuthDWORD4+108+60pinAuthのバイト数を示す。
pbPinAuthBYTE*8/4+112+64PINプロトコルのpinAuth値へのポインタ。
lHmacSecretExtINT4+120+68hmac-secret拡張の指定値を示す。
pHmacSecretMcExtensionWEBAUTHN_CTAPCBOR_HMAC_SALT_EXTENSION*8/4+128+72作成時hmac-secret拡張データへのポインタ。NULL可。
lPrfExtINT4+136+76PRF拡張の指定値を示す。
cbHmacSecretSaltValuesDWORD4+140+80hmac-secretソルト値のバイト数を示す。
pbHmacSecretSaltValuesBYTE*8/4+144+84hmac-secretソルト値データへのポインタ。
dwCredProtectDWORD4+152+88要求する資格情報保護レベルを示す。
dwPinProtocolDWORD4+156+92使用するPINプロトコルのバージョンを示す。
dwEnterpriseAttestationDWORD4+160+96エンタープライズアテステーションの種別を示す。
cbCredBlobExtDWORD4+164+100credBlob拡張データのバイト数を示す。
pbCredBlobExtBYTE*8/4+168+104credBlob拡張データへのポインタ。
lLargeBlobKeyExtINT4+176+108largeBlobKey拡張の指定値を示す。
dwLargeBlobSupportDWORD4+180+112large blobのサポート要求を示す。
lMinPinLengthExtINT4+184+116minPinLength拡張の指定値を示す。
cbJsonExtDWORD4+188+120JSON形式拡張データのバイト数を示す。
pbJsonExtBYTE*8/4+192+124JSON形式の拡張データへのポインタ。

各言語での定義

#include <windows.h>

// WEBAUTHN_COSE_CREDENTIAL_PARAMETERS  (x64 16 / x86 8 バイト)
typedef struct WEBAUTHN_COSE_CREDENTIAL_PARAMETERS {
    DWORD cCredentialParameters;
    WEBAUTHN_COSE_CREDENTIAL_PARAMETER* pCredentialParameters;
} WEBAUTHN_COSE_CREDENTIAL_PARAMETERS;

// WEBAUTHN_CREDENTIAL_LIST  (x64 16 / x86 8 バイト)
typedef struct WEBAUTHN_CREDENTIAL_LIST {
    DWORD cCredentials;
    WEBAUTHN_CREDENTIAL_EX** ppCredentials;
} WEBAUTHN_CREDENTIAL_LIST;

// WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST  (x64 200 / x86 128 バイト)
typedef struct WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST {
    DWORD dwVersion;
    DWORD cbRpId;
    BYTE* pbRpId;
    DWORD cbClientDataHash;
    BYTE* pbClientDataHash;
    WEBAUTHN_RP_ENTITY_INFORMATION* pRpInformation;
    WEBAUTHN_USER_ENTITY_INFORMATION* pUserInformation;
    WEBAUTHN_COSE_CREDENTIAL_PARAMETERS WebAuthNCredentialParameters;
    WEBAUTHN_CREDENTIAL_LIST CredentialList;
    DWORD cbCborExtensionsMap;
    BYTE* pbCborExtensionsMap;
    WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS* pAuthenticatorOptions;
    BOOL fEmptyPinAuth;
    DWORD cbPinAuth;
    BYTE* pbPinAuth;
    INT lHmacSecretExt;
    WEBAUTHN_CTAPCBOR_HMAC_SALT_EXTENSION* pHmacSecretMcExtension;
    INT lPrfExt;
    DWORD cbHmacSecretSaltValues;
    BYTE* pbHmacSecretSaltValues;
    DWORD dwCredProtect;
    DWORD dwPinProtocol;
    DWORD dwEnterpriseAttestation;
    DWORD cbCredBlobExt;
    BYTE* pbCredBlobExt;
    INT lLargeBlobKeyExt;
    DWORD dwLargeBlobSupport;
    INT lMinPinLengthExt;
    DWORD cbJsonExt;
    BYTE* pbJsonExt;
} WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_COSE_CREDENTIAL_PARAMETERS
{
    public uint cCredentialParameters;
    public IntPtr pCredentialParameters;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_CREDENTIAL_LIST
{
    public uint cCredentials;
    public IntPtr ppCredentials;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST
{
    public uint dwVersion;
    public uint cbRpId;
    public IntPtr pbRpId;
    public uint cbClientDataHash;
    public IntPtr pbClientDataHash;
    public IntPtr pRpInformation;
    public IntPtr pUserInformation;
    public WEBAUTHN_COSE_CREDENTIAL_PARAMETERS WebAuthNCredentialParameters;
    public WEBAUTHN_CREDENTIAL_LIST CredentialList;
    public uint cbCborExtensionsMap;
    public IntPtr pbCborExtensionsMap;
    public IntPtr pAuthenticatorOptions;
    [MarshalAs(UnmanagedType.Bool)] public bool fEmptyPinAuth;
    public uint cbPinAuth;
    public IntPtr pbPinAuth;
    public int lHmacSecretExt;
    public IntPtr pHmacSecretMcExtension;
    public int lPrfExt;
    public uint cbHmacSecretSaltValues;
    public IntPtr pbHmacSecretSaltValues;
    public uint dwCredProtect;
    public uint dwPinProtocol;
    public uint dwEnterpriseAttestation;
    public uint cbCredBlobExt;
    public IntPtr pbCredBlobExt;
    public int lLargeBlobKeyExt;
    public uint dwLargeBlobSupport;
    public int lMinPinLengthExt;
    public uint cbJsonExt;
    public IntPtr pbJsonExt;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WEBAUTHN_COSE_CREDENTIAL_PARAMETERS
    Public cCredentialParameters As UInteger
    Public pCredentialParameters As IntPtr
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WEBAUTHN_CREDENTIAL_LIST
    Public cCredentials As UInteger
    Public ppCredentials As IntPtr
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST
    Public dwVersion As UInteger
    Public cbRpId As UInteger
    Public pbRpId As IntPtr
    Public cbClientDataHash As UInteger
    Public pbClientDataHash As IntPtr
    Public pRpInformation As IntPtr
    Public pUserInformation As IntPtr
    Public WebAuthNCredentialParameters As WEBAUTHN_COSE_CREDENTIAL_PARAMETERS
    Public CredentialList As WEBAUTHN_CREDENTIAL_LIST
    Public cbCborExtensionsMap As UInteger
    Public pbCborExtensionsMap As IntPtr
    Public pAuthenticatorOptions As IntPtr
    <MarshalAs(UnmanagedType.Bool)> Public fEmptyPinAuth As Boolean
    Public cbPinAuth As UInteger
    Public pbPinAuth As IntPtr
    Public lHmacSecretExt As Integer
    Public pHmacSecretMcExtension As IntPtr
    Public lPrfExt As Integer
    Public cbHmacSecretSaltValues As UInteger
    Public pbHmacSecretSaltValues As IntPtr
    Public dwCredProtect As UInteger
    Public dwPinProtocol As UInteger
    Public dwEnterpriseAttestation As UInteger
    Public cbCredBlobExt As UInteger
    Public pbCredBlobExt As IntPtr
    Public lLargeBlobKeyExt As Integer
    Public dwLargeBlobSupport As UInteger
    Public lMinPinLengthExt As Integer
    Public cbJsonExt As UInteger
    Public pbJsonExt As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class WEBAUTHN_COSE_CREDENTIAL_PARAMETERS(ctypes.Structure):
    _fields_ = [
        ("cCredentialParameters", wintypes.DWORD),
        ("pCredentialParameters", ctypes.c_void_p),
    ]

class WEBAUTHN_CREDENTIAL_LIST(ctypes.Structure):
    _fields_ = [
        ("cCredentials", wintypes.DWORD),
        ("ppCredentials", ctypes.c_void_p),
    ]

class WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST(ctypes.Structure):
    _fields_ = [
        ("dwVersion", wintypes.DWORD),
        ("cbRpId", wintypes.DWORD),
        ("pbRpId", ctypes.c_void_p),
        ("cbClientDataHash", wintypes.DWORD),
        ("pbClientDataHash", ctypes.c_void_p),
        ("pRpInformation", ctypes.c_void_p),
        ("pUserInformation", ctypes.c_void_p),
        ("WebAuthNCredentialParameters", WEBAUTHN_COSE_CREDENTIAL_PARAMETERS),
        ("CredentialList", WEBAUTHN_CREDENTIAL_LIST),
        ("cbCborExtensionsMap", wintypes.DWORD),
        ("pbCborExtensionsMap", ctypes.c_void_p),
        ("pAuthenticatorOptions", ctypes.c_void_p),
        ("fEmptyPinAuth", wintypes.BOOL),
        ("cbPinAuth", wintypes.DWORD),
        ("pbPinAuth", ctypes.c_void_p),
        ("lHmacSecretExt", ctypes.c_int),
        ("pHmacSecretMcExtension", ctypes.c_void_p),
        ("lPrfExt", ctypes.c_int),
        ("cbHmacSecretSaltValues", wintypes.DWORD),
        ("pbHmacSecretSaltValues", ctypes.c_void_p),
        ("dwCredProtect", wintypes.DWORD),
        ("dwPinProtocol", wintypes.DWORD),
        ("dwEnterpriseAttestation", wintypes.DWORD),
        ("cbCredBlobExt", wintypes.DWORD),
        ("pbCredBlobExt", ctypes.c_void_p),
        ("lLargeBlobKeyExt", ctypes.c_int),
        ("dwLargeBlobSupport", wintypes.DWORD),
        ("lMinPinLengthExt", ctypes.c_int),
        ("cbJsonExt", wintypes.DWORD),
        ("pbJsonExt", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct WEBAUTHN_COSE_CREDENTIAL_PARAMETERS {
    pub cCredentialParameters: u32,
    pub pCredentialParameters: *mut core::ffi::c_void,
}

#[repr(C)]
pub struct WEBAUTHN_CREDENTIAL_LIST {
    pub cCredentials: u32,
    pub ppCredentials: *mut core::ffi::c_void,
}

#[repr(C)]
pub struct WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST {
    pub dwVersion: u32,
    pub cbRpId: u32,
    pub pbRpId: *mut core::ffi::c_void,
    pub cbClientDataHash: u32,
    pub pbClientDataHash: *mut core::ffi::c_void,
    pub pRpInformation: *mut core::ffi::c_void,
    pub pUserInformation: *mut core::ffi::c_void,
    pub WebAuthNCredentialParameters: WEBAUTHN_COSE_CREDENTIAL_PARAMETERS,
    pub CredentialList: WEBAUTHN_CREDENTIAL_LIST,
    pub cbCborExtensionsMap: u32,
    pub pbCborExtensionsMap: *mut core::ffi::c_void,
    pub pAuthenticatorOptions: *mut core::ffi::c_void,
    pub fEmptyPinAuth: i32,
    pub cbPinAuth: u32,
    pub pbPinAuth: *mut core::ffi::c_void,
    pub lHmacSecretExt: i32,
    pub pHmacSecretMcExtension: *mut core::ffi::c_void,
    pub lPrfExt: i32,
    pub cbHmacSecretSaltValues: u32,
    pub pbHmacSecretSaltValues: *mut core::ffi::c_void,
    pub dwCredProtect: u32,
    pub dwPinProtocol: u32,
    pub dwEnterpriseAttestation: u32,
    pub cbCredBlobExt: u32,
    pub pbCredBlobExt: *mut core::ffi::c_void,
    pub lLargeBlobKeyExt: i32,
    pub dwLargeBlobSupport: u32,
    pub lMinPinLengthExt: i32,
    pub cbJsonExt: u32,
    pub pbJsonExt: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type WEBAUTHN_COSE_CREDENTIAL_PARAMETERS struct {
	cCredentialParameters uint32
	pCredentialParameters uintptr
}

type WEBAUTHN_CREDENTIAL_LIST struct {
	cCredentials uint32
	ppCredentials uintptr
}

type WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST struct {
	dwVersion uint32
	cbRpId uint32
	pbRpId uintptr
	cbClientDataHash uint32
	pbClientDataHash uintptr
	pRpInformation uintptr
	pUserInformation uintptr
	WebAuthNCredentialParameters WEBAUTHN_COSE_CREDENTIAL_PARAMETERS
	CredentialList WEBAUTHN_CREDENTIAL_LIST
	cbCborExtensionsMap uint32
	pbCborExtensionsMap uintptr
	pAuthenticatorOptions uintptr
	fEmptyPinAuth int32
	cbPinAuth uint32
	pbPinAuth uintptr
	lHmacSecretExt int32
	pHmacSecretMcExtension uintptr
	lPrfExt int32
	cbHmacSecretSaltValues uint32
	pbHmacSecretSaltValues uintptr
	dwCredProtect uint32
	dwPinProtocol uint32
	dwEnterpriseAttestation uint32
	cbCredBlobExt uint32
	pbCredBlobExt uintptr
	lLargeBlobKeyExt int32
	dwLargeBlobSupport uint32
	lMinPinLengthExt int32
	cbJsonExt uint32
	pbJsonExt uintptr
}
type
  WEBAUTHN_COSE_CREDENTIAL_PARAMETERS = record
    cCredentialParameters: DWORD;
    pCredentialParameters: Pointer;
  end;

  WEBAUTHN_CREDENTIAL_LIST = record
    cCredentials: DWORD;
    ppCredentials: Pointer;
  end;

  WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST = record
    dwVersion: DWORD;
    cbRpId: DWORD;
    pbRpId: Pointer;
    cbClientDataHash: DWORD;
    pbClientDataHash: Pointer;
    pRpInformation: Pointer;
    pUserInformation: Pointer;
    WebAuthNCredentialParameters: WEBAUTHN_COSE_CREDENTIAL_PARAMETERS;
    CredentialList: WEBAUTHN_CREDENTIAL_LIST;
    cbCborExtensionsMap: DWORD;
    pbCborExtensionsMap: Pointer;
    pAuthenticatorOptions: Pointer;
    fEmptyPinAuth: BOOL;
    cbPinAuth: DWORD;
    pbPinAuth: Pointer;
    lHmacSecretExt: Integer;
    pHmacSecretMcExtension: Pointer;
    lPrfExt: Integer;
    cbHmacSecretSaltValues: DWORD;
    pbHmacSecretSaltValues: Pointer;
    dwCredProtect: DWORD;
    dwPinProtocol: DWORD;
    dwEnterpriseAttestation: DWORD;
    cbCredBlobExt: DWORD;
    pbCredBlobExt: Pointer;
    lLargeBlobKeyExt: Integer;
    dwLargeBlobSupport: DWORD;
    lMinPinLengthExt: Integer;
    cbJsonExt: DWORD;
    pbJsonExt: Pointer;
  end;
const WEBAUTHN_COSE_CREDENTIAL_PARAMETERS = extern struct {
    cCredentialParameters: u32,
    pCredentialParameters: ?*anyopaque,
};

const WEBAUTHN_CREDENTIAL_LIST = extern struct {
    cCredentials: u32,
    ppCredentials: ?*anyopaque,
};

const WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST = extern struct {
    dwVersion: u32,
    cbRpId: u32,
    pbRpId: ?*anyopaque,
    cbClientDataHash: u32,
    pbClientDataHash: ?*anyopaque,
    pRpInformation: ?*anyopaque,
    pUserInformation: ?*anyopaque,
    WebAuthNCredentialParameters: WEBAUTHN_COSE_CREDENTIAL_PARAMETERS,
    CredentialList: WEBAUTHN_CREDENTIAL_LIST,
    cbCborExtensionsMap: u32,
    pbCborExtensionsMap: ?*anyopaque,
    pAuthenticatorOptions: ?*anyopaque,
    fEmptyPinAuth: i32,
    cbPinAuth: u32,
    pbPinAuth: ?*anyopaque,
    lHmacSecretExt: i32,
    pHmacSecretMcExtension: ?*anyopaque,
    lPrfExt: i32,
    cbHmacSecretSaltValues: u32,
    pbHmacSecretSaltValues: ?*anyopaque,
    dwCredProtect: u32,
    dwPinProtocol: u32,
    dwEnterpriseAttestation: u32,
    cbCredBlobExt: u32,
    pbCredBlobExt: ?*anyopaque,
    lLargeBlobKeyExt: i32,
    dwLargeBlobSupport: u32,
    lMinPinLengthExt: i32,
    cbJsonExt: u32,
    pbJsonExt: ?*anyopaque,
};
type
  WEBAUTHN_COSE_CREDENTIAL_PARAMETERS {.bycopy.} = object
    cCredentialParameters: uint32
    pCredentialParameters: pointer

  WEBAUTHN_CREDENTIAL_LIST {.bycopy.} = object
    cCredentials: uint32
    ppCredentials: pointer

  WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST {.bycopy.} = object
    dwVersion: uint32
    cbRpId: uint32
    pbRpId: pointer
    cbClientDataHash: uint32
    pbClientDataHash: pointer
    pRpInformation: pointer
    pUserInformation: pointer
    WebAuthNCredentialParameters: WEBAUTHN_COSE_CREDENTIAL_PARAMETERS
    CredentialList: WEBAUTHN_CREDENTIAL_LIST
    cbCborExtensionsMap: uint32
    pbCborExtensionsMap: pointer
    pAuthenticatorOptions: pointer
    fEmptyPinAuth: int32
    cbPinAuth: uint32
    pbPinAuth: pointer
    lHmacSecretExt: int32
    pHmacSecretMcExtension: pointer
    lPrfExt: int32
    cbHmacSecretSaltValues: uint32
    pbHmacSecretSaltValues: pointer
    dwCredProtect: uint32
    dwPinProtocol: uint32
    dwEnterpriseAttestation: uint32
    cbCredBlobExt: uint32
    pbCredBlobExt: pointer
    lLargeBlobKeyExt: int32
    dwLargeBlobSupport: uint32
    lMinPinLengthExt: int32
    cbJsonExt: uint32
    pbJsonExt: pointer
struct WEBAUTHN_COSE_CREDENTIAL_PARAMETERS
{
    uint cCredentialParameters;
    void* pCredentialParameters;
}

struct WEBAUTHN_CREDENTIAL_LIST
{
    uint cCredentials;
    void* ppCredentials;
}

struct WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST
{
    uint dwVersion;
    uint cbRpId;
    void* pbRpId;
    uint cbClientDataHash;
    void* pbClientDataHash;
    void* pRpInformation;
    void* pUserInformation;
    WEBAUTHN_COSE_CREDENTIAL_PARAMETERS WebAuthNCredentialParameters;
    WEBAUTHN_CREDENTIAL_LIST CredentialList;
    uint cbCborExtensionsMap;
    void* pbCborExtensionsMap;
    void* pAuthenticatorOptions;
    int fEmptyPinAuth;
    uint cbPinAuth;
    void* pbPinAuth;
    int lHmacSecretExt;
    void* pHmacSecretMcExtension;
    int lPrfExt;
    uint cbHmacSecretSaltValues;
    void* pbHmacSecretSaltValues;
    uint dwCredProtect;
    uint dwPinProtocol;
    uint dwEnterpriseAttestation;
    uint cbCredBlobExt;
    void* pbCredBlobExt;
    int lLargeBlobKeyExt;
    uint dwLargeBlobSupport;
    int lMinPinLengthExt;
    uint cbJsonExt;
    void* pbJsonExt;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST サイズ: 128 バイト(x86)
dim st, 32    ; 4byte整数×32(構造体サイズ 128 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; cbRpId : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pbRpId : BYTE* (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; cbClientDataHash : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; pbClientDataHash : BYTE* (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pRpInformation : WEBAUTHN_RP_ENTITY_INFORMATION* (+20, 4byte)  varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; pUserInformation : WEBAUTHN_USER_ENTITY_INFORMATION* (+24, 4byte)  varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; WebAuthNCredentialParameters : WEBAUTHN_COSE_CREDENTIAL_PARAMETERS (+28, 8byte)  varptr(st)+28 を基点に操作(8byte:入れ子/配列)
; CredentialList : WEBAUTHN_CREDENTIAL_LIST (+36, 8byte)  varptr(st)+36 を基点に操作(8byte:入れ子/配列)
; cbCborExtensionsMap : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; pbCborExtensionsMap : BYTE* (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; pAuthenticatorOptions : WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS* (+52, 4byte)  varptr(st)+52 を基点に操作(4byte:入れ子/配列)
; fEmptyPinAuth : BOOL (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; cbPinAuth : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; pbPinAuth : BYTE* (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; lHmacSecretExt : INT (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; pHmacSecretMcExtension : WEBAUTHN_CTAPCBOR_HMAC_SALT_EXTENSION* (+72, 4byte)  varptr(st)+72 を基点に操作(4byte:入れ子/配列)
; lPrfExt : INT (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; cbHmacSecretSaltValues : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; pbHmacSecretSaltValues : BYTE* (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; dwCredProtect : DWORD (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; dwPinProtocol : DWORD (+92, 4byte)  st.23 = 値  /  値 = st.23   (lpoke/lpeek も可)
; dwEnterpriseAttestation : DWORD (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; cbCredBlobExt : DWORD (+100, 4byte)  st.25 = 値  /  値 = st.25   (lpoke/lpeek も可)
; pbCredBlobExt : BYTE* (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; lLargeBlobKeyExt : INT (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; dwLargeBlobSupport : DWORD (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; lMinPinLengthExt : INT (+116, 4byte)  st.29 = 値  /  値 = st.29   (lpoke/lpeek も可)
; cbJsonExt : DWORD (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; pbJsonExt : BYTE* (+124, 4byte)  st.31 = 値  /  値 = st.31   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST サイズ: 200 バイト(x64)
dim st, 50    ; 4byte整数×50(構造体サイズ 200 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; cbRpId : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pbRpId : BYTE* (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; cbClientDataHash : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pbClientDataHash : BYTE* (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pRpInformation : WEBAUTHN_RP_ENTITY_INFORMATION* (+32, 8byte)  varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; pUserInformation : WEBAUTHN_USER_ENTITY_INFORMATION* (+40, 8byte)  varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; WebAuthNCredentialParameters : WEBAUTHN_COSE_CREDENTIAL_PARAMETERS (+48, 16byte)  varptr(st)+48 を基点に操作(16byte:入れ子/配列)
; CredentialList : WEBAUTHN_CREDENTIAL_LIST (+64, 16byte)  varptr(st)+64 を基点に操作(16byte:入れ子/配列)
; cbCborExtensionsMap : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; pbCborExtensionsMap : BYTE* (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; pAuthenticatorOptions : WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS* (+96, 8byte)  varptr(st)+96 を基点に操作(8byte:入れ子/配列)
; fEmptyPinAuth : BOOL (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; cbPinAuth : DWORD (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; pbPinAuth : BYTE* (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; lHmacSecretExt : INT (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; pHmacSecretMcExtension : WEBAUTHN_CTAPCBOR_HMAC_SALT_EXTENSION* (+128, 8byte)  varptr(st)+128 を基点に操作(8byte:入れ子/配列)
; lPrfExt : INT (+136, 4byte)  st.34 = 値  /  値 = st.34   (lpoke/lpeek も可)
; cbHmacSecretSaltValues : DWORD (+140, 4byte)  st.35 = 値  /  値 = st.35   (lpoke/lpeek も可)
; pbHmacSecretSaltValues : BYTE* (+144, 8byte)  qpoke st,144,値 / qpeek(st,144)  ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; dwCredProtect : DWORD (+152, 4byte)  st.38 = 値  /  値 = st.38   (lpoke/lpeek も可)
; dwPinProtocol : DWORD (+156, 4byte)  st.39 = 値  /  値 = st.39   (lpoke/lpeek も可)
; dwEnterpriseAttestation : DWORD (+160, 4byte)  st.40 = 値  /  値 = st.40   (lpoke/lpeek も可)
; cbCredBlobExt : DWORD (+164, 4byte)  st.41 = 値  /  値 = st.41   (lpoke/lpeek も可)
; pbCredBlobExt : BYTE* (+168, 8byte)  qpoke st,168,値 / qpeek(st,168)  ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; lLargeBlobKeyExt : INT (+176, 4byte)  st.44 = 値  /  値 = st.44   (lpoke/lpeek も可)
; dwLargeBlobSupport : DWORD (+180, 4byte)  st.45 = 値  /  値 = st.45   (lpoke/lpeek も可)
; lMinPinLengthExt : INT (+184, 4byte)  st.46 = 値  /  値 = st.46   (lpoke/lpeek も可)
; cbJsonExt : DWORD (+188, 4byte)  st.47 = 値  /  値 = st.47   (lpoke/lpeek も可)
; pbJsonExt : BYTE* (+192, 8byte)  qpoke st,192,値 / qpeek(st,192)  ※IronHSPのみ。3.7/3.8は lpoke st,192,下位 : lpoke st,196,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global WEBAUTHN_COSE_CREDENTIAL_PARAMETERS
    #field int cCredentialParameters
    #field intptr pCredentialParameters
#endstruct

#defstruct global WEBAUTHN_CREDENTIAL_LIST
    #field int cCredentials
    #field intptr ppCredentials
#endstruct

#defstruct global WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST
    #field int dwVersion
    #field int cbRpId
    #field intptr pbRpId
    #field int cbClientDataHash
    #field intptr pbClientDataHash
    #field intptr pRpInformation
    #field intptr pUserInformation
    #field WEBAUTHN_COSE_CREDENTIAL_PARAMETERS WebAuthNCredentialParameters
    #field WEBAUTHN_CREDENTIAL_LIST CredentialList
    #field int cbCborExtensionsMap
    #field intptr pbCborExtensionsMap
    #field intptr pAuthenticatorOptions
    #field bool fEmptyPinAuth
    #field int cbPinAuth
    #field intptr pbPinAuth
    #field int lHmacSecretExt
    #field intptr pHmacSecretMcExtension
    #field int lPrfExt
    #field int cbHmacSecretSaltValues
    #field intptr pbHmacSecretSaltValues
    #field int dwCredProtect
    #field int dwPinProtocol
    #field int dwEnterpriseAttestation
    #field int cbCredBlobExt
    #field intptr pbCredBlobExt
    #field int lLargeBlobKeyExt
    #field int dwLargeBlobSupport
    #field int lMinPinLengthExt
    #field int cbJsonExt
    #field intptr pbJsonExt
#endstruct

stdim st, WEBAUTHN_CTAPCBOR_MAKE_CREDENTIAL_REQUEST        ; NSTRUCT 変数を確保
st->dwVersion = 100
mes "dwVersion=" + st->dwVersion