Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/crypto/md5.c

    r740 r988  
    4444 * initialization constants.
    4545 */
    46 _PUBLIC_ void MD5Init(struct MD5Context *ctx)
     46_PUBLIC_ void MD5Init(MD5_CTX *ctx)
    4747{
    4848    ctx->buf[0] = 0x67452301;
     
    5959 * of bytes.
    6060 */
    61 _PUBLIC_ void MD5Update(struct MD5Context *ctx, const uint8_t *buf, size_t len)
     61_PUBLIC_ void MD5Update(MD5_CTX *ctx, const uint8_t *buf, size_t len)
    6262{
    6363    register uint32_t t;
     
    107107 * 1 0* (64-bit count of bits processed, MSB-first)
    108108 */
    109 _PUBLIC_ void MD5Final(uint8_t digest[16], struct MD5Context *ctx)
     109_PUBLIC_ void MD5Final(uint8_t digest[16], MD5_CTX *ctx)
    110110{
    111111    unsigned int count;
     
    138138    byteReverse(ctx->in, 14);
    139139
    140     /* Append length in bits and transform */
    141     ((uint32_t *) ctx->in)[14] = ctx->bits[0];
    142     ((uint32_t *) ctx->in)[15] = ctx->bits[1];
     140    /* Append length in bits and transform.
     141     * Use memcpy to avoid strict-aliasing problems.
     142     * This way it can be optimized.
     143     */
     144    memcpy(&ctx->in[14 * sizeof(uint32_t)], &ctx->bits[0], sizeof(uint32_t));
     145    memcpy(&ctx->in[15 * sizeof(uint32_t)], &ctx->bits[1], sizeof(uint32_t));
    143146
    144147    MD5Transform(ctx->buf, (uint32_t *) ctx->in);
Note: See TracChangeset for help on using the changeset viewer.