Git Product home page Git Product logo

Comments (5)

Bluzzi avatar Bluzzi commented on August 17, 2024

There are other differences between the two versions:

  • saltLength no longer exists (original issue)
  • the type of salt is any | undefined instead of Buffer | undefined
  • the type of associatedData is any | undefined instead of Buffer | undefined
  • the type of secret is any | undefined instead of Buffer | undefined
  • raw is no longer present - but I see that it is added dynamically when typing the function hash
// v0.40.1
export type Options = {
    hashLength?: number | undefined;
    timeCost?: number | undefined;
    memoryCost?: number | undefined;
    parallelism?: number | undefined;
    type?: 0 | 2 | 1 | undefined;
    version?: number | undefined;
    salt?: any;
    associatedData?: any;
    secret?: any;
};

// v0.31.2
export interface Options {
  hashLength?: number;
  timeCost?: number;
  memoryCost?: number;
  parallelism?: number;
  type?: typeof argon2d | typeof argon2i | typeof argon2id;
  version?: number;
  salt?: Buffer;
  saltLength?: number;
  raw?: boolean;
  secret?: Buffer;
  associatedData?: Buffer;
}

from node-argon2.

Jendorski avatar Jendorski commented on August 17, 2024

No one has said anything?. They just changed the parameters without changing the doc?

from node-argon2.

ranisalt avatar ranisalt commented on August 17, 2024

No one has said anything?. They just changed the parameters without changing the doc?

The parameter was not changed, there is a bug in Typescript when generating object types from JSDoc that I still didn't figure out how to fix, since it works as expected on my machine, in an isolated container

from node-argon2.

ranisalt avatar ranisalt commented on August 17, 2024

I just republished and Typescript is still generating incorrect types.

from node-argon2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.