bmb-crypto
v0.1.0
Published
Cryptographic functions powered by BMB — Node.js bindings
Maintainers
Readme
bmb-crypto
Cryptographic functions powered by BMB — Node.js FFI bindings.
Installation
npm install bmb-crypto koffiRequires the bmb_crypto native shared library.
Getting the native library
Option A — Download from GitHub Releases (recommended):
- Go to lang-bmb Releases
- Download
bmb-libs-<your-platform>.zipfrom the latest release - Place
bmb_crypto.dll/libbmb_crypto.so/libbmb_crypto.dylibnext toindex.js
Option B — Build from source:
cd /path/to/lang-bmb
cargo build --release
./target/release/bmb build ecosystem/bmb-crypto/src/lib.bmb --shared -o ecosystem/bmb-crypto/bmb_cryptoFunctions
| Function | Description |
|----------|-------------|
| sha256(s) | SHA-256 hash (hex string) |
| md5(s) | MD5 hash (hex string) |
| crc32(s) | CRC-32 checksum (hex string) |
| base64_encode(s) | Base64 encode |
| base64_decode(s) | Base64 decode |
| base32_encode(s) | Base32 encode |
| base32_decode(s) | Base32 decode |
| hmac_sha256(key, msg) | HMAC-SHA256 (hex string) |
| adler32(s) | Adler-32 checksum (hex) |
| fletcher16(s) | Fletcher-16 checksum (hex) |
| xor_checksum(s) | XOR checksum (hex) |
| rot13(s) | ROT-13 transform |
| hex_encode(s) | Hex encode |
| hex_decode(s) | Hex decode |
License
MIT
