Git Product home page Git Product logo

Comments (1)

rhash avatar rhash commented on May 23, 2024

Hello!
the function rhash_md5_process_block() accepts array of unsigned values,
so ctx->message[] should not be specially filled for BigEndian CPUs.
This md5 algorithm was tested on PPC emulator (BigEndian) and works fine.

20.02.2013 10:27, sailzeng wrote:

In function
void rhash_md5_update(md5_ctx /ctx, const unsigned char/ msg, size_t size)
//----------------------------------------------------------------------------------------------------------
if(index) {
unsigned left = md5_block_size - index;
le32_copy((char*)ctx->message, index, msg, (size < left ? size : left));
if(size < left) return;

/* process partial block */
rhash_md5_process_block(ctx->hash, ctx->message);
msg += left;
size -= left;
}

//----------------------------------------------------------------------------------------------------------
this codes is unnecessary.

In function
void rhash_md5_final(md5_ctx /ctx, unsigned char/ result)
//------------------------------------------------------------------------------------------------------
ctx->message[14] = (unsigned)(ctx->length << 3);
ctx->message[15] = (unsigned)(ctx->length >> 29);
//------------------------------------------------------------------------------------------------------

this code must think about bytes endian ?

β€”
Reply to this email directly or view it on GitHub
#4.

from rhash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.