node-crypto-rs
v0.0.7
Published
Replace Node builtin crypto module with Rust
Readme
node-crypto-rs
Replace Node builtin crypto module with Rust.
[!WARNING]
This package is experimental.
Installation
npm i node-crypto-rsUsage
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
