0.0.15 • Published 1 year ago

@cm-iv/bun-crypto v0.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago