🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@hazae41/cadenas

Package Overview
Dependencies
Maintainers
0
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hazae41/cadenas

Zero-copy TLS protocol for the web

latest
Source
npmnpm
Version
0.4.2
Version published
Weekly downloads
285
122.66%
Maintainers
0
Weekly downloads
 
Created
Source
npm i @hazae41/cadenas

Node Package 📦

DO NOT USE

This is experimental software in early development

  • It has security issues
  • Things change quickly

Features

Current features

  • 100% TypeScript and ESM
  • Zero-copy reading and writing
  • Transport agnostic (HTTP, WebSocket)
  • WebStreams based backpressure
  • Common CA Database certificates
  • TLS 1.2

Upcoming Features

  • TLS 1.3
  • Zero RTT

Usage

import { TlsClientDuplex, Ciphers } from "@hazae41/cadenas"

function encrypt(tcp: ReadableWritablePair<Opaque, Writable>): ReadableWritablePair<Opaque, Writable> {
  const ciphers = [Ciphers.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]
  const tls = new TlsClientDuplex({ host_name: "example.com", ciphers })

  tcp.readable.pipeTo(tls.inner.writable).catch(() => {})
  tls.inner.readable.pipeTo(tcp.writable).catch(() => {})

  return tls.outer
}

Keywords

tls

FAQs

Package last updated on 01 Sep 2024

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