Skip to content

hash update fail #9364

@makc

Description

@makc

node v5.11 on mac:

$ node
> var sha256 = require('crypto').createHash('sha256');
undefined
> sha256.update('1')
Hash { _handle: {}, _options: undefined }
> sha256.digest('hex')
'6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b'
> sha256.update('2')
TypeError: HashUpdate fail
    at TypeError (native)
    at Hash.update (crypto.js:70:16)
    at repl:1:8
    at REPLServer.defaultEval (repl.js:270:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:439:10)
    at emitOne (events.js:95:20)
    at REPLServer.emit (events.js:182:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
> 

the docs say, "This can be called many times with new data as it is streamed", apparently not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions