Skip to content

ECDH.setPrivateKey() is a noop since v12.0.0-nightly.20201014 #27687

@nornagon

Description

@nornagon
const crypto = require('crypto')
a = crypto.createECDH('secp521r1')
a.setPrivateKey(crypto.createHash('sha256').update('alice', 'utf8').digest())
a.getPrivateKey()
// Node.js / Electron v11 => <Buffer 2b d8 06 c9 7f 0e 00 af 1a 1f c3 32 8f a7 63 a9 26 97 23 c8 db 8f ac 4f 93 af 71 db 18 6d 6e 90>
// Electron v12.0.0-nightly.20201014+ => Uncaught Error: Failed to get ECDH private key

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions