ホーム › Security.Authentication.WebAuthn › CTAPCBOR_HYBRID_STORAGE_LINKED_DATA
CTAPCBOR_HYBRID_STORAGE_LINKED_DATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwVersion | DWORD | 4 | +0 | +0 | この構造体のバージョン番号を示す。 |
| cbContactId | DWORD | 4 | +4 | +4 | コンタクトIDのバイト数を示す。 |
| pbContactId | BYTE* | 8/4 | +8 | +8 | ハイブリッド転送のコンタクトIDへのポインタ。 |
| cbLinkId | DWORD | 4 | +16 | +12 | リンクIDのバイト数を示す。 |
| pbLinkId | BYTE* | 8/4 | +24 | +16 | デバイス間リンクを識別するリンクIDへのポインタ。 |
| cbLinkSecret | DWORD | 4 | +32 | +20 | リンクシークレットのバイト数を示す。 |
| pbLinkSecret | BYTE* | 8/4 | +40 | +24 | リンク用の共有シークレットへのポインタ。 |
| cbPublicKey | DWORD | 4 | +48 | +28 | 公開鍵のバイト数を示す。 |
| pbPublicKey | BYTE* | 8/4 | +56 | +32 | 認証器の公開鍵へのポインタ。 |
| pwszAuthenticatorName | LPWSTR | 8/4 | +64 | +36 | 認証器の表示名へのポインタ。 |
| wEncodedTunnelServerDomain | WORD | 2 | +72 | +40 | エンコードされたトンネルサーバードメインを示す値。 |
各言語での定義
#include <windows.h>
// CTAPCBOR_HYBRID_STORAGE_LINKED_DATA (x64 80 / x86 44 バイト)
typedef struct CTAPCBOR_HYBRID_STORAGE_LINKED_DATA {
DWORD dwVersion;
DWORD cbContactId;
BYTE* pbContactId;
DWORD cbLinkId;
BYTE* pbLinkId;
DWORD cbLinkSecret;
BYTE* pbLinkSecret;
DWORD cbPublicKey;
BYTE* pbPublicKey;
LPWSTR pwszAuthenticatorName;
WORD wEncodedTunnelServerDomain;
} CTAPCBOR_HYBRID_STORAGE_LINKED_DATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CTAPCBOR_HYBRID_STORAGE_LINKED_DATA
{
public uint dwVersion;
public uint cbContactId;
public IntPtr pbContactId;
public uint cbLinkId;
public IntPtr pbLinkId;
public uint cbLinkSecret;
public IntPtr pbLinkSecret;
public uint cbPublicKey;
public IntPtr pbPublicKey;
public IntPtr pwszAuthenticatorName;
public ushort wEncodedTunnelServerDomain;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CTAPCBOR_HYBRID_STORAGE_LINKED_DATA
Public dwVersion As UInteger
Public cbContactId As UInteger
Public pbContactId As IntPtr
Public cbLinkId As UInteger
Public pbLinkId As IntPtr
Public cbLinkSecret As UInteger
Public pbLinkSecret As IntPtr
Public cbPublicKey As UInteger
Public pbPublicKey As IntPtr
Public pwszAuthenticatorName As IntPtr
Public wEncodedTunnelServerDomain As UShort
End Structureimport ctypes
from ctypes import wintypes
class CTAPCBOR_HYBRID_STORAGE_LINKED_DATA(ctypes.Structure):
_fields_ = [
("dwVersion", wintypes.DWORD),
("cbContactId", wintypes.DWORD),
("pbContactId", ctypes.c_void_p),
("cbLinkId", wintypes.DWORD),
("pbLinkId", ctypes.c_void_p),
("cbLinkSecret", wintypes.DWORD),
("pbLinkSecret", ctypes.c_void_p),
("cbPublicKey", wintypes.DWORD),
("pbPublicKey", ctypes.c_void_p),
("pwszAuthenticatorName", ctypes.c_void_p),
("wEncodedTunnelServerDomain", ctypes.c_ushort),
]#[repr(C)]
pub struct CTAPCBOR_HYBRID_STORAGE_LINKED_DATA {
pub dwVersion: u32,
pub cbContactId: u32,
pub pbContactId: *mut core::ffi::c_void,
pub cbLinkId: u32,
pub pbLinkId: *mut core::ffi::c_void,
pub cbLinkSecret: u32,
pub pbLinkSecret: *mut core::ffi::c_void,
pub cbPublicKey: u32,
pub pbPublicKey: *mut core::ffi::c_void,
pub pwszAuthenticatorName: *mut core::ffi::c_void,
pub wEncodedTunnelServerDomain: u16,
}import "golang.org/x/sys/windows"
type CTAPCBOR_HYBRID_STORAGE_LINKED_DATA struct {
dwVersion uint32
cbContactId uint32
pbContactId uintptr
cbLinkId uint32
pbLinkId uintptr
cbLinkSecret uint32
pbLinkSecret uintptr
cbPublicKey uint32
pbPublicKey uintptr
pwszAuthenticatorName uintptr
wEncodedTunnelServerDomain uint16
}type
CTAPCBOR_HYBRID_STORAGE_LINKED_DATA = record
dwVersion: DWORD;
cbContactId: DWORD;
pbContactId: Pointer;
cbLinkId: DWORD;
pbLinkId: Pointer;
cbLinkSecret: DWORD;
pbLinkSecret: Pointer;
cbPublicKey: DWORD;
pbPublicKey: Pointer;
pwszAuthenticatorName: Pointer;
wEncodedTunnelServerDomain: Word;
end;const CTAPCBOR_HYBRID_STORAGE_LINKED_DATA = extern struct {
dwVersion: u32,
cbContactId: u32,
pbContactId: ?*anyopaque,
cbLinkId: u32,
pbLinkId: ?*anyopaque,
cbLinkSecret: u32,
pbLinkSecret: ?*anyopaque,
cbPublicKey: u32,
pbPublicKey: ?*anyopaque,
pwszAuthenticatorName: ?*anyopaque,
wEncodedTunnelServerDomain: u16,
};type
CTAPCBOR_HYBRID_STORAGE_LINKED_DATA {.bycopy.} = object
dwVersion: uint32
cbContactId: uint32
pbContactId: pointer
cbLinkId: uint32
pbLinkId: pointer
cbLinkSecret: uint32
pbLinkSecret: pointer
cbPublicKey: uint32
pbPublicKey: pointer
pwszAuthenticatorName: pointer
wEncodedTunnelServerDomain: uint16struct CTAPCBOR_HYBRID_STORAGE_LINKED_DATA
{
uint dwVersion;
uint cbContactId;
void* pbContactId;
uint cbLinkId;
void* pbLinkId;
uint cbLinkSecret;
void* pbLinkSecret;
uint cbPublicKey;
void* pbPublicKey;
void* pwszAuthenticatorName;
ushort wEncodedTunnelServerDomain;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CTAPCBOR_HYBRID_STORAGE_LINKED_DATA サイズ: 44 バイト(x86)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; cbContactId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pbContactId : BYTE* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cbLinkId : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pbLinkId : BYTE* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cbLinkSecret : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; pbLinkSecret : BYTE* (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cbPublicKey : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; pbPublicKey : BYTE* (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; pwszAuthenticatorName : LPWSTR (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; wEncodedTunnelServerDomain : WORD (+40, 2byte) wpoke st,40,値 / 値 = wpeek(st,40)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CTAPCBOR_HYBRID_STORAGE_LINKED_DATA サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; cbContactId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pbContactId : BYTE* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; cbLinkId : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pbLinkId : BYTE* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; cbLinkSecret : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; pbLinkSecret : BYTE* (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; cbPublicKey : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; pbPublicKey : BYTE* (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; pwszAuthenticatorName : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; wEncodedTunnelServerDomain : WORD (+72, 2byte) wpoke st,72,値 / 値 = wpeek(st,72)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CTAPCBOR_HYBRID_STORAGE_LINKED_DATA
#field int dwVersion
#field int cbContactId
#field intptr pbContactId
#field int cbLinkId
#field intptr pbLinkId
#field int cbLinkSecret
#field intptr pbLinkSecret
#field int cbPublicKey
#field intptr pbPublicKey
#field intptr pwszAuthenticatorName
#field short wEncodedTunnelServerDomain
#endstruct
stdim st, CTAPCBOR_HYBRID_STORAGE_LINKED_DATA ; NSTRUCT 変数を確保
st->dwVersion = 100
mes "dwVersion=" + st->dwVersion