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 utility that generates cryptographic signatures for documents to ensure authenticity and integrity.
@generates
/**
* Signs a document string using an RSA private key with SHA-256 algorithm.
*
* @param {string} document - The document content to sign
* @param {string|Buffer} privateKey - PEM-encoded RSA private key
* @param {string} [encoding='hex'] - Output encoding ('hex' or 'base64')
* @returns {string} The digital signature in the specified encoding
*/
function signDocument(document, privateKey, encoding = 'hex') {
// IMPLEMENTATION HERE
}
/**
* Signs multiple document chunks using an RSA private key with SHA-256 algorithm.
* This is useful for large documents that need to be processed in chunks.
*
* @param {string[]} chunks - Array of document chunks to sign
* @param {string|Buffer} privateKey - PEM-encoded RSA private key
* @returns {string} The digital signature in hex encoding
*/
function signChunks(chunks, privateKey) {
// IMPLEMENTATION HERE
}
module.exports = {
signDocument,
signChunks,
};Provides cryptographic signing capabilities.