mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-14 02:05:17 +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
|
|
@ -166,7 +166,6 @@ ServerHasXEP421(ParseeData *data, char *from)
|
|||
static char *
|
||||
ScrambleOID(ParseeData *data, char *opaque_oid)
|
||||
{
|
||||
unsigned char *raw;
|
||||
char *sha, *mxid;
|
||||
const ParseeConfig *c = data->config;
|
||||
if (!opaque_oid)
|
||||
|
|
@ -175,9 +174,7 @@ ScrambleOID(ParseeData *data, char *opaque_oid)
|
|||
}
|
||||
|
||||
/* Turns this into a 128-byte long, Matrix-safe value. */
|
||||
raw = Sha256(opaque_oid);
|
||||
sha = ShaToHex(raw);
|
||||
Free(raw);
|
||||
sha = ParseeSHA256(opaque_oid);
|
||||
|
||||
/* TODO: Either mark this specially, or drop Parsee JID flags
|
||||
* altogether before any 1.0.0 */
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ end_error:
|
|||
room = ParseeFindDMRoom(args, to, from);
|
||||
data = body ? ArrayGet(body->children, 0) : NULL;
|
||||
|
||||
/* TODO: CLEAN THAT UP */
|
||||
/* TODO: CLEAN THAT UP INTO A CREATEDM FUNCTION */
|
||||
mroom_id = ParseeGetBridgedRoom(args, stanza);
|
||||
if (!mroom_id && !room && !XMPPIsParseeStanza(stanza) &&
|
||||
to && *to == '@')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue