xrtSshKexHashSha256
按 RFC 5656/8731 顺序计算 Curve25519 SHA-256 exchange hash。
xsshcode xrtSshKexHashSha256( const xsshkexhashsha256* pInput, void* pHash );
| 参数 | 说明 |
|---|---|
| const xsshkexhashsha256* pInput | 输入 |
| void* pHash | 哈希回调 |
返回:按 RFC 5656/8731 顺序计算 Curve25519 SHA-256 exchange hash。
示例已编译验证
/* 按 RFC 5656/8731 顺序计算 Curve25519 SHA-256 exchange hash。 */ result = xrtSshKexHashSha256(pInput, pHash);
xrtSshKexDeriveSha256
按 RFC 4253 扩展 A-F 类密钥材料,输出可大于单个摘要。
xsshcode xrtSshKexDeriveSha256( void* pOutput, size_t iOutputSize, xbytesview SharedSecret, const void* pExchangeHash, const void* pSessionId, uint8 iLetter );
| 参数 | 说明 |
|---|---|
| void* pOutput | 出:输出缓冲 |
| size_t iOutputSize | OututSze 参数 |
| xbytesview SharedSecret | SharedSecret 参数 |
| const void* pExchangeHash | ExchangeHash 参数 |
| const void* pSessionId | SessonId 参数 |
| uint8 iLetter | Letter 参数 |
返回:按 RFC 4253 扩展 A-F 类密钥材料,输出可大于单个摘要。
示例已编译验证
/* 按 RFC 4253 扩展 A-F 类密钥材料,输出可大于单个摘要。 */ result = xrtSshKexDeriveSha256(pOutput, iOutputSize, SharedSecret, pExchangeHash, pSessionId, iLetter);