SecPkgContext_KeyInfoW 结构 (sspi.h)

SecPkgContext_KeyInfo 结构包含有关安全上下文中使用的会话密钥的信息。 QueryContextAttributes (General) 函数使用此结构。

使用 Schannel 安全支持提供程序 (SSP) 的应用程序不应使用 SecPkgContext_KeyInfo 结构。 请改用 SecPkgContext_ConnectionInfo 结构。

语法

typedef struct _SecPkgContext_KeyInfoW {
  SEC_WCHAR     *sSignatureAlgorithmName;
  SEC_WCHAR     *sEncryptAlgorithmName;
  unsigned long KeySize;
  unsigned long SignatureAlgorithm;
  unsigned long EncryptAlgorithm;
} SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;

成员

sSignatureAlgorithmName

指向以 null 结尾的字符串的指针,该字符串包含用于生成签名的算法的名称(如果可用),例如“MD5”或“SHA-2”。

sEncryptAlgorithmName

指向以 null 结尾的字符串的指针,该字符串包含用于加密消息的算法的名称(如果可用)。 保留供将来使用。

KeySize

指定会话密钥的有效密钥长度(以位为单位)。 这通常是 40、56 或 128 位。

SignatureAlgorithm

指定用于生成签名的算法标识符 (ALG_ID) (如果可用)。

EncryptAlgorithm

指定用于加密消息的算法标识符 (ALG_ID) 。 保留供将来使用。

注解

注意

sspi.h 标头将 SecPkgContext_KeyInfo 定义为别名,该别名根据 UNICODE 预处理器常量的定义自动选择此函数的 ANSI 或 Unicode 版本。 将非特定编码别名的使用与非非特定编码的代码混合使用可能会导致不匹配,从而导致编译或运行时错误。 有关详细信息,请参阅 函数原型的约定

要求

   
最低受支持的客户端 Windows XP [仅限桌面应用]
最低受支持的服务器 Windows Server 2003 [仅限桌面应用]
标头 sspi.h (包括 Security.h)

另请参阅

QueryContextAttributes (常规)