URL
https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 21 |
Rev 161 |
Line 74... |
Line 74... |
}
|
}
|
|
|
/* Put result from CTX in first 16 bytes following RESBUF. The result
|
/* Put result from CTX in first 16 bytes following RESBUF. The result
|
must be in little endian byte order.
|
must be in little endian byte order.
|
|
|
IMPORTANT: On some systems it is required that RESBUF is correctly
|
IMPORTANT: RESBUF may not be aligned as strongly as MD5_UNIT32 so we
|
aligned for a 32 bits value. */
|
put things in a local (aligned) buffer first, then memcpy into RESBUF. */
|
void *
|
void *
|
md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
|
md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
|
{
|
{
|
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
|
md5_uint32 buffer[4];
|
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
|
|
((md5_uint32 *) resbuf)[2] = SWAP (ctx->C);
|
buffer[0] = SWAP (ctx->A);
|
((md5_uint32 *) resbuf)[3] = SWAP (ctx->D);
|
buffer[1] = SWAP (ctx->B);
|
|
buffer[2] = SWAP (ctx->C);
|
|
buffer[3] = SWAP (ctx->D);
|
|
|
|
memcpy (resbuf, buffer, 16);
|
|
|
return resbuf;
|
return resbuf;
|
}
|
}
|
|
|
/* Process the remaining bytes in the internal buffer and the usual
|
/* Process the remaining bytes in the internal buffer and the usual
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.