提交 5af0af90 authored 作者: Viktor Krykun's avatar Viktor Krykun 提交者: Travis Cross

Add zrtp_randstr2

Modified-by: 's avatarTravis Cross <tc@traviscross.com>
Signed-off-by: 's avatarTravis Cross <tc@traviscross.com>
上级 4ba74ad3
...@@ -956,6 +956,8 @@ int zrtp_entropy_add(zrtp_global_t* zrtp, const unsigned char *buffer, uint32_t ...@@ -956,6 +956,8 @@ int zrtp_entropy_add(zrtp_global_t* zrtp, const unsigned char *buffer, uint32_t
*/ */
int zrtp_randstr(zrtp_global_t* zrtp, unsigned char *buffer, uint32_t length); int zrtp_randstr(zrtp_global_t* zrtp, unsigned char *buffer, uint32_t length);
int zrtp_randstr2(unsigned char *buffer, uint32_t length);
/* \} */ /* \} */
#if defined(__cplusplus) #if defined(__cplusplus)
......
...@@ -343,3 +343,9 @@ int zrtp_randstr(zrtp_global_t* zrtp, unsigned char *buffer, uint32_t length) ...@@ -343,3 +343,9 @@ int zrtp_randstr(zrtp_global_t* zrtp, unsigned char *buffer, uint32_t length)
return generated; return generated;
} }
int zrtp_randstr2(unsigned char *buffer, uint32_t length) {
zrtp_global_t zrtp;
zrtp.rand_initialized = 0;
return zrtp_randstr(&zrtp, buffer, length);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论