Hook utilities
While hooks typically rely on external packages or libraries, direct package imports are disabled for security and performance reasons. Instead, Cloudhooks provides pre-approved utility packages and functions through the built-in hookUtils object.
Available Utilities
Currently, hookUtils includes:
Note: Additional utility packages will be added in future releases based on common usage patterns and security requirements.
Using the Crypto Package
The crypto package provides cryptographic functions from the NodeJS crypto module. With this utility, you can perform various cryptographic operations including:
- Message hashing (MD5, SHA-1, SHA-256, etc.)
- HMAC generation
- Symmetric encryption/decryption
- Random number generation
- Key pair generation
Here's an example of generating a hash: