0.0.7 • Published 4 months ago

node-crypto-rs v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

node-crypto-rs

version CI

Replace Node builtin crypto module with Rust.

!WARNING
This package is experimental.

Installation

npm i node-crypto-rs

Usage

import { encrypt_aes_gcm, decrypt_aes_gcm } from 'node-crypto-rs'

const key = await crypto.subtle.exportKey(
  'raw',
  await crypto.subtle.generateKey({ name: 'AES-GCM', length: 256 }, true, ['encrypt', 'decrypt'])
);

const encrypted = await encrypt_aes_gcm(Buffer.from(key), Buffer.from('hello', 'utf-8'))
const plainText = await decrypt_aes_gcm(Buffer.from(key), encrypted)

License

MIT License © 2025 XLor

0.0.7

4 months ago

0.0.6

5 months ago