Completed
Pull Request — master (#83)
by Ruben de
02:25
created

lib/pbkdf2_sha512-browser.js   A

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 10
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 2
c 1
b 0
f 0
nc 1
mnd 1
bc 1
fnc 1
dl 0
loc 10
rs 10
bpm 1
cpm 2
noi 2
1
var pbkdf2Sha512 = function(pw, salt, iterations, keySizeBytes) {
2
    // assumes asmCrypto is made available
3
    var asmCrypto = typeof window !== "undefined" ? window.asmCrypto : self.asmCrypto;
0 ignored issues
show
Bug introduced by
The variable self seems to be never declared. If this is a global, consider adding a /** global: self */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
4
5
    return new Buffer(new asmCrypto.PBKDF2_HMAC_SHA512.bytes(pw, salt, iterations, keySizeBytes).buffer);
0 ignored issues
show
Bug introduced by
The variable Buffer seems to be never declared. If this is a global, consider adding a /** global: Buffer */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
6
};
7
8
module.exports = {
9
    digest: pbkdf2Sha512
10
};
11