镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fs.readFile using utf8 returns different hash than php hash_file #6

Open

Description

@BrayanIribe

qrv15_0.zip

The file qrv15_0.dat has the hash "97AFF0D35593C126B9628821172B7344" while in your extension returns
"35af0c029c18a83b2a5655c1256418ba" due to the line 72 you're reading the files with utf8 encoding while the file is ANSI.

fs.readFile(path, 'utf8', function(err, data) {

change to

fs.readFile(path, function(err, data) {

it took me hours to fix it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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