@appvise/digest-pbkdf2
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -27,5 +27,5 @@ var __create = Object.create; | ||
}); | ||
var import_digest_sha_1 = __toModule(require("@appvise/digest-sha-1")); | ||
var import_digest_sha1 = __toModule(require("@appvise/digest-sha1")); | ||
function PBKDF2(password, salt, num_iterations, num_bytes) { | ||
var m_bpassword = (0, import_digest_sha_1.rstr2binb)(password); | ||
var m_bpassword = (0, import_digest_sha1.rstr2binb)(password); | ||
var m_salt = salt; | ||
@@ -48,3 +48,3 @@ var m_total_iterations = num_iterations; | ||
if (m_bpassword.length > 16) | ||
m_bpassword = (0, import_digest_sha_1.binb_sha1)(m_bpassword, password.length * chrsz); | ||
m_bpassword = (0, import_digest_sha1.binb_sha1)(m_bpassword, password.length * chrsz); | ||
for (var i = 0; i < 16; ++i) { | ||
@@ -68,7 +68,7 @@ m_ipad[i] = m_bpassword[i] ^ 909522486; | ||
var salt_block = m_salt + String.fromCharCode(m_current_block >> 24 & 15) + String.fromCharCode(m_current_block >> 16 & 15) + String.fromCharCode(m_current_block >> 8 & 15) + String.fromCharCode(m_current_block & 15); | ||
m_hash = (0, import_digest_sha_1.binb_sha1)(m_ipad.concat((0, import_digest_sha_1.rstr2binb)(salt_block)), 512 + salt_block.length * 8); | ||
m_hash = (0, import_digest_sha_1.binb_sha1)(m_opad.concat(m_hash), 512 + 160); | ||
m_hash = (0, import_digest_sha1.binb_sha1)(m_ipad.concat((0, import_digest_sha1.rstr2binb)(salt_block)), 512 + salt_block.length * 8); | ||
m_hash = (0, import_digest_sha1.binb_sha1)(m_opad.concat(m_hash), 512 + 160); | ||
} else { | ||
m_hash = (0, import_digest_sha_1.binb_sha1)(m_ipad.concat(m_hash), 512 + m_hash.length * 32); | ||
m_hash = (0, import_digest_sha_1.binb_sha1)(m_opad.concat(m_hash), 512 + 160); | ||
m_hash = (0, import_digest_sha1.binb_sha1)(m_ipad.concat(m_hash), 512 + m_hash.length * 32); | ||
m_hash = (0, import_digest_sha1.binb_sha1)(m_opad.concat(m_hash), 512 + 160); | ||
} | ||
@@ -86,3 +86,3 @@ for (var j = 0; j < m_hash.length; ++j) | ||
if (m_current_block < m_total_blocks) { | ||
m_key += (0, import_digest_sha_1.rstr2hex)((0, import_digest_sha_1.binb2rstr)(m_buffer)); | ||
m_key += (0, import_digest_sha1.rstr2hex)((0, import_digest_sha1.binb2rstr)(m_buffer)); | ||
m_current_block++; | ||
@@ -95,3 +95,3 @@ m_buffer = new Array(0, 0, 0, 0, 0); | ||
} else { | ||
var tmp = (0, import_digest_sha_1.rstr2hex)((0, import_digest_sha_1.binb2rstr)(m_buffer)); | ||
var tmp = (0, import_digest_sha1.rstr2hex)((0, import_digest_sha1.binb2rstr)(m_buffer)); | ||
m_key += tmp.substr(0, (m_key_length - (m_total_blocks - 1) * m_hash_length) * 2); | ||
@@ -98,0 +98,0 @@ m_result_func(m_key); |
{ | ||
"name": "@appvise/digest-pbkdf2", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
16541