mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-14 00:45:10 +00:00
[MOD] Use specific SHA1/256 abstraction functions
This commit is contained in:
parent
6cd3df21db
commit
4c158ea186
9 changed files with 80 additions and 22 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include <Parsee.h>
|
||||
#include <XML.h>
|
||||
|
||||
/* The default component port Prosody uses. */
|
||||
|
|
@ -81,14 +82,11 @@ static char *
|
|||
ComputeHandshake(char *shared, char *stream)
|
||||
{
|
||||
char *source;
|
||||
unsigned char *raw_sha;
|
||||
char *sha;
|
||||
|
||||
source = StrConcat(2, stream, shared);
|
||||
raw_sha = Sha1(source);
|
||||
sha = ShaToHex(raw_sha);
|
||||
sha = ParseeSHA1(source);
|
||||
|
||||
Free(raw_sha);
|
||||
Free(source);
|
||||
|
||||
return sha;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue