Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Undefined klass argument to pbkdf2 does not throw or fail  #44

@daviddahl

Description

@daviddahl

Perhaps I am "doing it wrong" (it happens a lot), but the pbkdf2 function returns a 16 byte zeroed out key if an undefined klass is passed in as an argument:

var args = {
      key: pass,
      salt: salt,
      c: 1000,
      dkLen: 128,
      klass: undefined // XXX: using triplesec.HMAC_SHA256 of course works!
    };

    triplesec.pbkdf2(args, function callback (key) {
      console.log('PBKDF2 callback key: ',  key); // this key is basically [0,0,0,0,0,0,0...]
    });

btw: I would be happy to produce some clear usage examples if you have a place for them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions