QString bytesToHexString(const QByteArray &sources) { if (sources.isEmpty()) return QString(); QString result; for (int i = 0; i < sources.size(); ++i) { QString hex = QString::number(static_cast(sources[i]), 16); if (hex.size() < 2) { hex.prepend('0'); } result.append(hex); } return result; }

QT+openssl实现以下Java代码 private static String bytesToHexStringbyte sources if sources == null return null; StringBuilder stringBuffer = new StringBuilder; for byte source sources

原文地址: http://www.cveoy.top/t/topic/ensP 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录