Modules@robinpath/encrypt
@robinpath/encrypt
0.1.0PublicAES and RSA encryption/decryption with key generation
@robinpath/encrypt
AES-256-GCM and RSA encryption/decryption with key generation, password-based key derivation, and hashing
Why use this module?
The encrypt module lets you:
- Encrypt text with AES using a password (auto-generates salt/IV)
- Decrypt AES-encrypted data using a password
- Encrypt text with a raw hex key (for advanced use)
- Generate a cryptographically secure random key
- Generate an RSA key pair
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/encrypt
Quick Start
No credentials needed — start using it right away:
encrypt.aesDecrypt $encryptedData "my-password"
Available Functions
| Function | Description |
|---|---|
encrypt.aesEncrypt | Encrypt text with AES using a password (auto-generates salt/IV) |
encrypt.aesDecrypt | Decrypt AES-encrypted data using a password |
encrypt.aesEncryptRaw | Encrypt text with a raw hex key (for advanced use) |
encrypt.generateKey | Generate a cryptographically secure random key |
encrypt.rsaGenerateKeys | Generate an RSA key pair |
encrypt.rsaEncrypt | Encrypt text with an RSA public key |
encrypt.rsaDecrypt | Decrypt RSA-encrypted text with a private key |
encrypt.hash | Hash a string (sha256, sha512, md5, etc.) |
encrypt.deriveKey | Derive an encryption key from a password using scrypt |
encrypt.randomIv | Generate a random initialization vector |
Examples
Decrypt AES-encrypted data using a password
encrypt.aesDecrypt $encryptedData "my-password"
Encrypt text with a raw hex key (for advanced use)
encrypt.aesEncryptRaw "data" $hexKey
Generate a cryptographically secure random key
encrypt.generateKey 256
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/encrypt";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
encrypt.aesDecrypt $encryptedData "my-password"
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
utilities
1
@dev-tester/hello-world
v2.0.0dev-tester
Updated description
0 downloads
...
utilities
0
@robinpath/apollo
v0.1.1robinpath
Apollo module for RobinPath.
0 downloads
...
utilities
0
@robinpath/archive
v0.1.1robinpath
Create and extract .zip and .tar.gz file archives
0 downloads
...
utilities
0
@robinpath/assert
v0.1.1robinpath
Testing assertions: equal, deepEqual, truthy, falsy, type checks, includes, matches, throws, and more
0 downloads
...
Install
$ robinpath install @robinpath/encrypt Version0.1.0
LicenseMIT
Unpacked Size4.7 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

