@hazae41/cadenas
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published
npm i @hazae41/cadenas

Node Package 📦

DO NOT USE

This is experimental software in early development

  1. It has security issues
  2. 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
  • 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
}

Package Sidebar

Install

npm i @hazae41/cadenas

Weekly Downloads

5

Version

0.4.0

License

MIT

Unpacked Size

2.3 MB

Total Files

393

Last publish

Collaborators

  • hazae41