0.0.15 • Published 3 months ago

@cm-iv/bun-crypto v0.0.15

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

Bun Crypto

A file encryption library for Node.js/Bun and backed by native Rust speed - uses the age Rust crate under the hood.

Currently only works with GNU/Linux x64 and MSVC Windows x64 targets.

Exported Functions

// Generate an `age::x25519::Identity` secret key
genSecretKey(): string

// Derive the `age::x25519::Recipient` public key -
// when given the secret key string
derivePubKey(secret: string): string

// Encrypt binary data of type `Uint8Array` when also -
// given the public key string
encryptFile(fileData: Uint8Array, pubStr: string): Uint8Array

// Decrypt binary data of an encrypted file with -
// type `Uint8Array` when also provided the secret key string
decryptFile(encryptedData: Uint8Array, secretKeyStr: string): Uint8Array

// Generate a SHA512 hash string when given -
// file data of type `Uint8Array`
genFileHash(fileData: Uint8Array): string
0.0.15

3 months ago

0.0.14

9 months ago

0.0.13

9 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago