ホーム › Security.ExtensibleAuthenticationProtocol › EapCertificateCredential
EapCertificateCredential
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| certHash | BYTE | 20 | +0 | +0 | 証明書を識別するハッシュ値(固定長バイト配列)。 |
| password | LPWSTR | 8/4 | +24 | +20 | 証明書の秘密鍵を保護するパスワード文字列。NULL可。 |
各言語での定義
#include <windows.h>
// EapCertificateCredential (x64 32 / x86 24 バイト)
typedef struct EapCertificateCredential {
BYTE certHash[20];
LPWSTR password;
} EapCertificateCredential;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct EapCertificateCredential
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] public byte[] certHash;
public IntPtr password;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure EapCertificateCredential
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=20)> Public certHash() As Byte
Public password As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class EapCertificateCredential(ctypes.Structure):
_fields_ = [
("certHash", ctypes.c_ubyte * 20),
("password", ctypes.c_void_p),
]#[repr(C)]
pub struct EapCertificateCredential {
pub certHash: [u8; 20],
pub password: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type EapCertificateCredential struct {
certHash [20]byte
password uintptr
}type
EapCertificateCredential = record
certHash: array[0..19] of Byte;
password: Pointer;
end;const EapCertificateCredential = extern struct {
certHash: [20]u8,
password: ?*anyopaque,
};type
EapCertificateCredential {.bycopy.} = object
certHash: array[20, uint8]
password: pointerstruct EapCertificateCredential
{
ubyte[20] certHash;
void* password;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; EapCertificateCredential サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; certHash : BYTE (+0, 20byte) varptr(st)+0 を基点に操作(20byte:入れ子/配列)
; password : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; EapCertificateCredential サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; certHash : BYTE (+0, 20byte) varptr(st)+0 を基点に操作(20byte:入れ子/配列)
; password : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global EapCertificateCredential
#field byte certHash 20
#field intptr password
#endstruct
stdim st, EapCertificateCredential ; NSTRUCT 変数を確保