xrtSshEcdhInitWrite

构建 SSH_MSG_KEX_ECDH_INIT payload。

xsshcode xrtSshEcdhInitWrite( xsshwriter* pWriter, xbytesview ClientPublic );
参数说明
xsshwriter* pWriter写入器
xbytesview ClientPublic客户端公钥
返回:构建 SSH_MSG_KEX_ECDH_INIT payload。

示例已编译验证

sshecdhinitwrite obj;
xrtSshEcdhInitWrite(&obj, pWriter, ClientPublic);

xrtSshEcdhInitRead

严格解析完整 SSH_MSG_KEX_ECDH_INIT payload。

xsshcode xrtSshEcdhInitRead( xbytesview Payload, xsshecdhinit* pMessage );
参数说明
xbytesview Payload负载
xsshecdhinit* pMessage出:消息
返回:严格解析完整 SSH_MSG_KEX_ECDH_INIT payload。

示例已编译验证

sshecdhinitread obj;
xrtSshEcdhInitRead(&obj, Payload, pMessage);

xrtSshEcdhReplyWrite

构建 SSH_MSG_KEX_ECDH_REPLY payload。

xsshcode xrtSshEcdhReplyWrite( xsshwriter* pWriter, xbytesview ServerHostKey, xbytesview ServerPublic, xbytesview Signature );
参数说明
xsshwriter* pWriter写入器
xbytesview ServerHostKeyServerHostKey 参数
xbytesview ServerPublicServerPublc 参数
xbytesview Signature签名
返回:构建 SSH_MSG_KEX_ECDH_REPLY payload。

示例已编译验证

/* 构建 SSH_MSG_KEX_ECDH_REPLY payload。 */
result = xrtSshEcdhReplyWrite(pWriter, ServerHostKey, ServerPublic, Signature);

xrtSshEcdhReplyRead

严格解析完整 SSH_MSG_KEX_ECDH_REPLY payload。

xsshcode xrtSshEcdhReplyRead( xbytesview Payload, xsshecdhreply* pMessage );
参数说明
xbytesview Payload负载
xsshecdhreply* pMessage出:消息
返回:严格解析完整 SSH_MSG_KEX_ECDH_REPLY payload。

示例已编译验证

/* 严格解析完整 SSH_MSG_KEX_ECDH_REPLY payload。 */
result = xrtSshEcdhReplyRead(Payload, pMessage);