Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

md6.js outputs wrong result #3

@cuixiping

Description

@cuixiping
     var md6 = new md6hash();
     var data = "md6 FTW"; debugger;
     var result = md6.hex(data);
     console.log(result);

will output:

7bfaa624f661a683be2a3b2007493006a30a7845ee1670e499927861a8e74ccefunction (){
            return this.slice();
        }

Tested in chrome.

The issue is caused by wrong usage of for ... in with array object.

for(i in hash) {

should be changed to:

for(i=0; i<hash.length; i++) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions