Socket
Book a DemoInstallSign in
Socket

@altcha/crypto

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@altcha/crypto

A lightweight library simplifying asymmetric data encryption using Web Crypto

0.0.2
latest
npmnpm
Version published
Weekly downloads
11K
-18.81%
Maintainers
1
Weekly downloads
 
Created
Source

ALTCHA JS Crypto Library

A lightweight library simplifying asymmetric data encryption using Web Crypto. It employs a hybrid approach combining RSA keys and AES encryption for enhanced security.

Features

  • Simplified hybrid encryption using RSA + AES
  • Compatible with all modern browsers supporting Web Crypto
  • Supports node.js streams, facilitating encryption of large files

Compatibility

  • Node.js 20+
  • Bun 1+
  • Deno 1+
  • Modern browsers

Usage

import { cipher, rsa } from '@altcha/crypto';

const keyPair = await rsa.generateKeyPair();

const encrypted = await cipher.encrypt(keyPair.publicKey, new TextEncoder().encode('Hello World'));

const decrypted = await cipher.decrypt(keyPair.privateKey, encrypted);

Node.js streams:

import { createReadStream, createWriteStream } from 'node:fs';
import { nodeCipher, rsa } from '@altcha/crypto';

const keyPair = await rsa.generateKeyPair();

await nodeCipher.encryptStream(keyPair.publicKey, createReadStream('./input.txt'), createWriteStream('./output.txt.enc'));

API

TODO

License

MIT

Keywords

altcha

FAQs

Package last updated on 30 Apr 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.