tessl install tessl/npm-crypto-browserify@3.12.0Browser-compatible implementation of Node.js crypto module providing cryptographic operations in web environments.
Agent Success
Agent success rate when using this tile
100%
Improvement
Agent success rate improvement when using this tile compared to baseline
1x
Baseline
Agent success rate without this tile
100%
A secure password storage and encryption key derivation utility that creates cryptographic keys from user passwords.
@generates
/**
* Synchronously derives an encryption key from a password.
*
* @param {string|Buffer} password - The password to derive the key from
* @param {string|Buffer} salt - Cryptographic salt to prevent rainbow table attacks
* @param {number} iterations - Number of iterations (higher = more secure but slower)
* @param {number} keyLength - Desired key length in bytes
* @param {string} algorithm - Hash algorithm to use (e.g., 'sha256', 'sha512', 'sha1')
* @returns {Buffer} The derived encryption key
*/
function deriveKeySync(password, salt, iterations, keyLength, algorithm) {
// IMPLEMENTATION HERE
}
/**
* Asynchronously derives an encryption key from a password.
*
* @param {string|Buffer} password - The password to derive the key from
* @param {string|Buffer} salt - Cryptographic salt to prevent rainbow table attacks
* @param {number} iterations - Number of iterations (higher = more secure but slower)
* @param {number} keyLength - Desired key length in bytes
* @param {string} algorithm - Hash algorithm to use (e.g., 'sha256', 'sha512', 'sha1')
* @param {function} callback - Callback function(err, key) called with the derived key
*/
function deriveKey(password, salt, iterations, keyLength, algorithm, callback) {
// IMPLEMENTATION HERE
}
module.exports = {
deriveKey,
deriveKeySync
};Provides password-based key derivation functionality for generating encryption keys from passwords.
@satisfied-by