Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

triplesec

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

triplesec

A CommonJS-compliant system for secure encryption of smallish secrets

  • 3.0.16
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is triplesec?

The triplesec npm package is a high-level cryptographic library that provides encryption, decryption, and hashing functionalities. It is designed to be easy to use and secure, combining multiple cryptographic algorithms to enhance security.

What are triplesec's main functionalities?

Encryption

This feature allows you to encrypt data using a specified key. The code sample demonstrates how to encrypt a simple plaintext message.

const triplesec = require('triplesec');
const plaintext = Buffer.from('Hello, World!');
const key = Buffer.from('mysecretkey');

triplesec.encrypt({ key: key, data: plaintext }, function(err, buff) {
  if (!err) {
    console.log('Encrypted:', buff.toString('hex'));
  }
});

Decryption

This feature allows you to decrypt data that was previously encrypted using the same key. The code sample shows how to decrypt an encrypted message.

const triplesec = require('triplesec');
const encryptedData = Buffer.from('...'); // Encrypted data in hex format
const key = Buffer.from('mysecretkey');

triplesec.decrypt({ key: key, data: encryptedData }, function(err, buff) {
  if (!err) {
    console.log('Decrypted:', buff.toString());
  }
});

Hashing

This feature allows you to generate a cryptographic hash of the given data. The code sample demonstrates how to hash a simple message.

const triplesec = require('triplesec');
const data = Buffer.from('Hello, World!');

triplesec.hash({ data: data }, function(err, buff) {
  if (!err) {
    console.log('Hash:', buff.toString('hex'));
  }
});

Other packages similar to triplesec

FAQs

Package last updated on 04 Jun 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc