使用std流打印16进制字符串示例
来源:互联网 发布:阿里云服务器价格计算 编辑:程序博客网 时间:2024/06/03 15:44
//depend on <sstream> and <iomanip> include.//std::string _strLastErrorstd::ostringstream ostr;fingerprint = libssh2_hostkey_hash(_session, LIBSSH2_HOSTKEY_HASH_SHA1);ostr << "Fingerprint: "; for (int i = 0; i < 20; i++) { unsigned char c = fingerprint[i]; int nT = c; ostr << std::hex << std::setw(2) << std::setfill('0') << nT; } _strLastError = ostr.str();
编译libssh要注意下面两个问题:
[1] 要依赖的头文件路径不是"D:\sdk\openssl-0.9.8o\include"而是“D:\sdk\openssl-0.9.8o\inc32”
[2]在用Visual Studio打开工程前,可以修改“D:\sdk\libssh2-1.4.3\win32\config.mk”中OpenSSL和Zlib路径的配置。
0 0
- 使用std流打印16进制字符串示例
- std::priority_queue使用示例 STL
- C++ std::mem_fn使用示例
- 16进制打印字符串数据
- android NDK 打印16进制字符串
- PrintWriter打印流示例
- 使用HashMap打印字符串
- C#使用UdpClient发送和接收UDP数据示例 16进制与字符串互转
- C#使用UdpClient发送和接收UDP数据示例 16进制与字符串互转
- C++ 使用std::getline()拆分字符串
- Linux C++ 字符串使用 指针,数组,std
- Python字符串join使用示例
- VC++ 中使用 std::string 转换字符串编码
- 使用std:min(),std:max()
- std字符串转换函数
- std中的字符串操作
- std:string格式化字符串
- std::string字符串分割
- iOS开发在点击或者输入结束后不需要键盘的时候如何隐藏并退出软键盘?
- 【UML】概念、关系、图(三)
- IOS Application生命周期
- wegtf
- Android UI开发详解之ActionBa
- 使用std流打印16进制字符串示例
- 使用Topshelf创建Windows 服务
- Webview调用JavaScript部分机型出错问题
- Jcrop Java实现截图的功能
- Kali Linux无线网络渗透测试教程(大学霸内部资料)
- arm7 汇编指令学习
- JS 雪花掉落(F12 Console里执行)
- HttpUrlConnection有关
- JFBlog 1.0 发布,基于 JFinal 的 Java 轻博客