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 ServerHostKey | ServerHostKey 参数 |
| xbytesview ServerPublic | ServerPublc 参数 |
| 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);