ホーム › Security.Authentication.WebAuthn › WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwVersion | DWORD | 4 | +0 | +0 | この構造体のバージョン番号を示す。 |
| lUp | INT | 4 | +4 | +4 | ユーザー存在確認(up)オプションの値を示す。 |
| lUv | INT | 4 | +8 | +8 | ユーザー検証(uv)オプションの値を示す。 |
| lRequireResidentKey | INT | 4 | +12 | +12 | 常駐鍵(rk)要求オプションの値を示す。 |
各言語での定義
#include <windows.h>
// WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS (x64 16 / x86 16 バイト)
typedef struct WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS {
DWORD dwVersion;
INT lUp;
INT lUv;
INT lRequireResidentKey;
} WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
{
public uint dwVersion;
public int lUp;
public int lUv;
public int lRequireResidentKey;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
Public dwVersion As UInteger
Public lUp As Integer
Public lUv As Integer
Public lRequireResidentKey As Integer
End Structureimport ctypes
from ctypes import wintypes
class WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS(ctypes.Structure):
_fields_ = [
("dwVersion", wintypes.DWORD),
("lUp", ctypes.c_int),
("lUv", ctypes.c_int),
("lRequireResidentKey", ctypes.c_int),
]#[repr(C)]
pub struct WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS {
pub dwVersion: u32,
pub lUp: i32,
pub lUv: i32,
pub lRequireResidentKey: i32,
}import "golang.org/x/sys/windows"
type WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS struct {
dwVersion uint32
lUp int32
lUv int32
lRequireResidentKey int32
}type
WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS = record
dwVersion: DWORD;
lUp: Integer;
lUv: Integer;
lRequireResidentKey: Integer;
end;const WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS = extern struct {
dwVersion: u32,
lUp: i32,
lUv: i32,
lRequireResidentKey: i32,
};type
WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS {.bycopy.} = object
dwVersion: uint32
lUp: int32
lUv: int32
lRequireResidentKey: int32struct WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
{
uint dwVersion;
int lUp;
int lUv;
int lRequireResidentKey;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lUp : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; lUv : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; lRequireResidentKey : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
#field int dwVersion
#field int lUp
#field int lUv
#field int lRequireResidentKey
#endstruct
stdim st, WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS ; NSTRUCT 変数を確保
st->dwVersion = 100
mes "dwVersion=" + st->dwVersion