Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: make update(buf, enc) ignore encoding #31766

Closed
wants to merge 1 commit into from

Commits on Feb 13, 2020

  1. crypto: make update(buf, enc) ignore encoding

    Make the cipher/decipher/hash/hmac update() methods ignore the input
    encoding when the input is a buffer.
    
    This is the documented behavior but some inputs were rejected, notably
    when the specified encoding is 'hex' and the buffer has an odd length
    (because a _string_ with an odd length is never a valid hex string.)
    
    The sign/verify update() methods work okay because they use different
    validation logic.
    
    Fixes: nodejs#31751
    bnoordhuis committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    badfa84 View commit details
    Browse the repository at this point in the history