CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-crypto-browserify

tessl install tessl/npm-crypto-browserify@3.12.0

Browser-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%

task.mdevals/scenario-9/

Cryptographic Configuration Manager

A utility module that provides configuration helpers for cryptographic operations, including RSA padding mode selection, elliptic curve point format conversion, and Diffie-Hellman parameter validation.

Capabilities

RSA Padding Mode Selection

  • Given the string "OAEP", the getPaddingMode function returns the appropriate numeric constant for OAEP padding @test
  • Given the string "PKCS1", the getPaddingMode function returns the appropriate numeric constant for PKCS#1 v1.5 padding @test
  • Given the string "PSS", the getPaddingMode function returns the appropriate numeric constant for PSS padding @test

Point Format Conversion

  • Given the string "compressed", the getPointFormat function returns the appropriate numeric constant for compressed point format @test
  • Given the string "uncompressed", the getPointFormat function returns the appropriate numeric constant for uncompressed point format @test

Diffie-Hellman Validation Helper

  • The getDHCheckFlags function returns an object containing all four DH check flag constants with their correct values @test

Implementation

@generates

API

/**
 * Converts a padding mode name to its numeric constant value.
 *
 * @param {string} mode - The padding mode name (e.g., "OAEP", "PKCS1", "PSS")
 * @returns {number} The numeric constant representing the padding mode
 */
function getPaddingMode(mode) {
  // IMPLEMENTATION HERE
}

/**
 * Converts a point format name to its numeric constant value.
 *
 * @param {string} format - The point format name (e.g., "compressed", "uncompressed", "hybrid")
 * @returns {number} The numeric constant representing the point format
 */
function getPointFormat(format) {
  // IMPLEMENTATION HERE
}

/**
 * Returns an object containing all Diffie-Hellman check flag constants.
 *
 * @returns {Object} An object with properties for each DH check flag
 */
function getDHCheckFlags() {
  // IMPLEMENTATION HERE
}

module.exports = {
  getPaddingMode,
  getPointFormat,
  getDHCheckFlags,
};

Dependencies { .dependencies }

crypto-browserify { .dependency }

Provides cryptographic constants for RSA padding modes, elliptic curve point formats, and Diffie-Hellman validation flags.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/crypto-browserify@3.12.x
tile.json