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%
Build a license verification system that validates software licenses using digital signatures.
Your company issues software licenses to customers. Each license is a JSON document containing license details (customer name, expiration date, allowed features). To prevent tampering, each license is digitally signed by your company's private key. Customer systems need to verify these licenses are authentic before granting access.
Implement a license verification module with two functions:
Create a function verifyLicense(licenseData, signature, publicKey) that:
true if the signature is valid, false otherwiseCreate a function verifyMultipleLicenses(licenses, publicKey) that:
data (string) and signature (hex-encoded string)valid: array of indices of valid licensesinvalid: array of indices of invalid licensesGiven:
"customer:acme-corp,expires:2025-12-31,features:premium"When: Verifying the license
Then: Returns true
Given:
When: Verifying the modified license
Then: Returns false
Given:
When: Verifying all licenses in batch
Then: Returns object with valid: [0, 2] and invalid: [1]
license-verifier.js that exports both functionslicense-verifier.test.js with test casesProvides cryptographic operations for signature verification in browser and Node.js environments.