Skip to content

crypto: crypto.create* - argument "options" is undocumented #14804

Description

@refack
  • Version: *
  • Platform: *
  • Subsystem: crypto

have a last optional argument options to control their stream behaviour

/cc @nodejs/documentation @nodejs/crypto @nodejs/streams

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    good first issueIssues that are suitable for first-time contributors.
    on Aug 13, 2017
  2. ashanhol commented on Aug 15, 2017

    @ashanhol
    Contributor

    To clarify @refack, these options are the OpenSSL options?
    These are strings, correct?

    Edit: If so, will submit a PR with these changes.

  3. refack commented on Aug 15, 2017

    @refack
    ContributorAuthor

    AFAICT from looking at the code, they are also stream options, as these methods wrap the underlining OpenSSL mechanism with a node transform stream.
    For example:

    node/lib/crypto.js

    Lines 75 to 81 in 0d22858

    exports.createHash = exports.Hash = Hash;
    function Hash(algorithm, options) {
    if (!(this instanceof Hash))
    return new Hash(algorithm, options);
    this._handle = new binding.Hash(algorithm);
    LazyTransform.call(this, options);
    }

    where LazyTransform is
    function LazyTransform(options) {
    this._options = options;
    this.writable = true;
    this.readable = true;
    }
    util.inherits(LazyTransform, stream.Transform);

  4. refack commented on Aug 15, 2017

    @refack
    ContributorAuthor

    @ashanhol thanks for taking this on 🥇
    There's an extra credit exercise to follow this up, but it requires some git spelunking, so it could wait for a future PR.

  5. added
    wipIssues and PRs that are still a work in progress.
    on Aug 15, 2017
  6. ashanhol commented on Aug 16, 2017

    @ashanhol
    Contributor

    Thanks @refack for your comments, they really helped. It's sometimes difficult to determine types.
    I updated the branch and will submit a PR. I'm definitely down for the extra credit.

  7. ashanhol commented on Aug 16, 2017

    @ashanhol
    Contributor

    @refack with the PR in works and waiting on the second round of approval, I'm available to jump into the next issue you had in mind.

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

    docIssues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.wipIssues and PRs that are still a work in progress.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions