ホーム › Security.Cryptography.Certificates › IX509AttributeArchiveKey
IX509AttributeArchiveKey
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 5
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 10 HRESULT InitializeEncode(IX509PrivateKey* pKey, EncodingType Encoding, LPWSTR strCAXCert, IObjectId* pAlgorithm, INT EncryptionStrength)
| pKey | IX509PrivateKey* | inoptional | アーカイブ (キー回復) の対象となる秘密キー (IX509PrivateKey) へのポインタである。 |
| Encoding | EncodingType | in | strCAXCert のエンコード形式を指定する EncodingType 値である。 |
| strCAXCert | LPWSTR | in | キーの暗号化に用いる CA 交換証明書 (KRA 証明書) をエンコードした文字列である。 |
| pAlgorithm | IObjectId* | inoptional | キーの暗号化に使用するアルゴリズムを表す IObjectId へのポインタである。 |
| EncryptionStrength | INT | in | 暗号化の強度をビット数で指定する。 |
vtbl 11 HRESULT InitializeDecode(EncodingType Encoding, LPWSTR strEncodedData)
| Encoding | EncodingType | in | strEncodedData のエンコード形式を指定する EncodingType 値である。 |
| strEncodedData | LPWSTR | in | デコード対象となるエンコード済みのキー アーカイブ属性データを格納した文字列である。 |
vtbl 12 HRESULT get_EncryptedKeyBlob(EncodingType Encoding, LPWSTR* pValue)
| Encoding | EncodingType | in | 出力する pValue の希望するエンコード形式を指定する EncodingType 値である。 |
| pValue | LPWSTR* | out | 暗号化された秘密キー BLOB を指定エンコード形式で受け取る出力先である。 |
| ppValue | IObjectId** | out | キーの暗号化に使用されたアルゴリズムを表す IObjectId へのポインタを受け取る出力先である。 |
| pValue | INT* | out | 暗号化の強度 (ビット数) を受け取る出力先である。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IX509AttributeArchiveKey "{728AB327-217D-11DA-B2A4-000E7BBB2B09}" #usecom global IX509AttributeArchiveKey IID_IX509AttributeArchiveKey "{}" #comfunc global IX509AttributeArchiveKey_InitializeEncode 10 sptr,int,wstr,sptr,int #comfunc global IX509AttributeArchiveKey_InitializeDecode 11 int,wstr #comfunc global IX509AttributeArchiveKey_get_EncryptedKeyBlob 12 int,var #comfunc global IX509AttributeArchiveKey_get_EncryptionAlgorithm 13 sptr #comfunc global IX509AttributeArchiveKey_get_EncryptionStrength 14 var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IX509AttributeArchiveKey "{728AB327-217D-11DA-B2A4-000E7BBB2B09}" #usecom global IX509AttributeArchiveKey IID_IX509AttributeArchiveKey "{}" #comfunc global IX509AttributeArchiveKey_InitializeEncode 10 sptr,int,wstr,sptr,int #comfunc global IX509AttributeArchiveKey_InitializeDecode 11 int,wstr #comfunc global IX509AttributeArchiveKey_get_EncryptedKeyBlob 12 int,sptr #comfunc global IX509AttributeArchiveKey_get_EncryptionAlgorithm 13 sptr #comfunc global IX509AttributeArchiveKey_get_EncryptionStrength 14 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。