Crypto Steps

Steps for encryption, decryption, hashing, and random value generation.

Crypto Steps

Crypto steps provide cryptographic operations -- encrypting and decrypting data, generating hashes, and producing random values.

Encrypt

Encrypts data using a symmetric encryption algorithm.

Data: vars.sensitiveData
Key: env.ENCRYPTION_KEY
Algorithm: aes-256-gcm
Assign To: encrypted

Decrypt

Decrypts data that was encrypted with the Encrypt step.

Data: vars.encrypted
Key: env.ENCRYPTION_KEY
Algorithm: aes-256-gcm
Assign To: decrypted

Hash

Generates a hash digest of the input data. Hashing is one-way -- the original data cannot be recovered.

Data: vars.fileContent
Algorithm: sha256
Encoding: hex
Assign To: checksum

For password hashing, use the Hash Password step (bcrypt) instead of this step. General-purpose hash algorithms like SHA-256 are not suitable for password storage.

Generate UUID

Generates a universally unique identifier (UUID v4).

Assign To: orderId

Result example: "f47ac10b-58cc-4372-a567-0e02b2c3d479"

Random Number

Generates a random number within a specified range.

Min: 1000
Max: 9999
Integer: true
Assign To: verificationCode

Random String

Generates a random string of specified length and character set.

Length: 24
Characters: alphanumeric
Assign To: sessionId
The data to encrypt. Strings and objects are accepted.
The encryption key. Use `env.ENCRYPTION_KEY` for environment variables.
Encryption algorithm: `aes-256-cbc`, `aes-256-gcm`. Defaults to `aes-256-cbc`.
Variable name to store the encrypted string.
The encrypted data string.
The same key used for encryption.
Must match the algorithm used for encryption.
Variable name to store the decrypted data.
The data to hash.
Hash algorithm: `md5`, `sha1`, `sha256`, `sha512`. Defaults to `sha256`.
Output encoding: `hex`, `base64`. Defaults to `hex`.
Variable name to store the hash string.
Variable name to store the UUID string.
Minimum value (inclusive). Defaults to 0.
Maximum value (inclusive). Defaults to 100.
Whether to return an integer. Defaults to true.
Variable name to store the generated number.
Length of the string. Defaults to 16.
Character set: `alphanumeric`, `alpha`, `numeric`, `hex`. Defaults to `alphanumeric`.
Variable name to store the generated string.
Steps Reference
/reference/steps
Browse all step categories
Auth Steps
/reference/steps/auth
JWT tokens and password hashing
Encoding Steps
/reference/steps/encoding
Base64 and URL encoding