Skip to content

Commit

Permalink
Add zrtp_randstr2
Browse files Browse the repository at this point in the history
Modified-by: Travis Cross <[email protected]>
Signed-off-by: Travis Cross <[email protected]>
  • Loading branch information
Viktor Krykun authored and traviscross committed Feb 11, 2013
1 parent 4ba74ad commit 5af0af9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/libzrtp/include/zrtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_randstr2(unsigned char *buffer, uint32_t length);

/* \} */

#if defined(__cplusplus)
Expand Down
6 changes: 6 additions & 0 deletions libs/libzrtp/src/zrtp_rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,9 @@ int zrtp_randstr(zrtp_global_t* zrtp, unsigned char *buffer, uint32_t length)

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);
}

0 comments on commit 5af0af9

Please sign in to comment.