You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tsscmp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsscmp

Timing safe string compare using double HMAC

1.0.6
latest
Source
npmnpm
Version published
Weekly downloads
5.9M
-1.13%
Maintainers
1
Weekly downloads
 
Created

What is tsscmp?

The tsscmp npm package is a utility for performing timing-safe string comparisons. This is particularly useful for security purposes, such as comparing cryptographic hashes or passwords, to prevent timing attacks.

What are tsscmp's main functionalities?

Timing-Safe String Comparison

This feature allows you to compare two strings in a way that is resistant to timing attacks. The comparison takes the same amount of time regardless of how similar the strings are, which helps to prevent attackers from gaining information based on the time it takes to compare the strings.

const tsscmp = require('tsscmp');

const a = 'password123';
const b = 'password123';

if (tsscmp(a, b)) {
  console.log('Strings are equal');
} else {
  console.log('Strings are not equal');
}

Other packages similar to tsscmp

Keywords

timing safe string compare

FAQs

Package last updated on 31 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts