当前位置:网站首页>WebRTC Native M96 基础Base模块介绍之实用方法的封装(MD5、Base64、时间、随机数)
WebRTC Native M96 基础Base模块介绍之实用方法的封装(MD5、Base64、时间、随机数)
2022-06-25 11:44:00 【一苇渡江694】
rtc_base message_digest
实现了多种类型的消息摘要算法,DIGEST_MD5、DIGEST_SHA_1、DIGEST_SHA_224、DIGEST_SHA_256、DIGEST_SHA_384、DIGEST_SHA_512[];
MD5:
MD5信息摘要算法(英语:MD5 Message-Digest Algorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value),用于确保信息传输完整一致。
inline std::string MD5(const std::string& input) {
return ComputeDigest(DIGEST_MD5, input);
}
std::string HA1 = MD5(sensitive);
ExplicitZeroMemory(sensitive, len);
delete[] sensitive;
std::string HA2 = MD5(A2);
std::string dig_response = MD5(HA1 + ":" + middle + ":" + HA2);
HMAC是密钥相关的哈希运算消息认证码(Hash-based Message Authentication Code)的缩写
使用:
size_t ret = rtc::ComputeHmac(rtc::DIGEST_SHA_1, key, keylen, buf.Data(),
msg_len_for_hmac
边栏推荐
- 数据库系列:MySQL索引优化总结(综合版)
- Spannable and editable, spannablestring and spannablestring
- Jincang database kingbasees plug-in identity_ pwdexp
- How to realize the rich text editor function of mobile terminal
- Whole process of web page request
- 基於Minifilter框架的雙緩沖透明加解密驅動 課程論文+項目源碼
- CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
- Windows11 MySQL service is missing
- Keywords serializable serialization and deserialization
- What is the development history, specific uses and structure of the chip
猜你喜欢
SQL injection vulnerability (bypass)
Leetcode 1249. Remove invalid brackets (awesome, finally made)
Idea local launch Flink task
基于SSH的高校实验室物品管理信息系统的设计与实现 论文文档+项目源码及数据库文件
Recommend a virtual machine software available for M1 computer
Xishan technology rushes to the scientific innovation board: it plans to raise 660million yuan. Guoyijun and his wife have 60% of the voting rights
CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
基於Minifilter框架的雙緩沖透明加解密驅動 課程論文+項目源碼
SQL注入漏洞(绕过篇)
Eureka accesses the console and reports an error: whitelabel error page
随机推荐
Arrays.asList()
Idea local launch Flink task
基于SSH的高校实验室物品管理信息系统的设计与实现 论文文档+项目源码及数据库文件
Comparator(用于Arrays.sort)
Two ways of redis persistence -- detailed explanation of RDB and AOF
.Net Core 中使用工厂模式
cnds
Comparator (for arrays.sort)
Wait (), notify (), notifyAll (), sleep (), condition, await (), signal()
Introduction to JVM principle
Application of analytic hierarchy process in college teaching evaluation system (principle + example + tool)
Flink deeply understands the graph generation process (source code interpretation)
Spark runs wordcount (case 1)
Keywords serializable serialization and deserialization
如何实现移动端富文本编辑器功能
Where do the guests come from
Double tampon transparent cryptage et décryptage basé sur le cadre minifilter
时创能源冲刺科创板:拟募资11亿 年营收7亿净利反降36%
Handler、Message、Looper、MessageQueue
Research on parallel computing architecture of meteorological early warning based on supercomputing platform