Generate UUID
| Parameter | Purpose | Example |
|---|---|---|
| $myVariable | This is the variable you want to store the generated value in. | $myVariable |
Example
Example

Create Authentication Token
| Parameter | Purpose | Example |
|---|---|---|
| dbtable | The ID of the database table that has authentication enabled | ”97” |
| extras | A JSON object that contains any extra information you want to include in the token | |
| expiration | The time in seconds that the token should remain valid | 86400 |
| id | The ID of the record to use to generate the authentication token | 1 |
| as | The variable to store the generated token in | $authToken |
Example
Example

Validate Password
| Parameter | Purpose | Example |
|---|---|---|
| text_password | The text version of the password to check | ”textPassword” $textPassword |
| hash_password | The hashed version of the password to check, usually coming from a database table | ”hashedPassword” $user1.password |
Example
Example

Generate Password
| Parameter | Purpose | Example |
|---|---|---|
| character_count | The length of the generated password | 12 |
| require_lowercase require_uppercase require_digit require_symbol | Various specifications for the generated password | |
| symbol_whitelist | If you require symbols in your generated password, whitelist the allowed symbols here. | |
| as | The variable that you want to store the generated password. | generatedPassword |
Example
Example

Generate Random Number
| Parameter | Purpose | Example |
|---|---|---|
| min | The beginning of the range for the randomly generated number | 0 |
| max | The end of the range for the randomly generated number | 10000 |
| as | The variable that you want to store the generated number | randomNumber |
Example
Example

Generate Random Bytes
| Parameter | Purpose | Example |
|---|---|---|
| length | The length of the string you’d like to generate | 16 |
| as | The variable that you want to store the random bytes generated | randomBytes |
Example
Example

Create Secret Key
| Parameter | Purpose | Example |
|---|---|---|
| bits | The length of the key generated. Common values are 1024, 2048, 4096, etc… | 1024 |
| format | The format of the key generated. This can be either object or base64 | ”object” |
| as | The variable that you want to store the key | crypto1 |
Example
Example

Create RSA Key
| Parameter | Purpose | Example |
|---|---|---|
| bits | The length of the key generated. Common values are 1024, 2048, 4096, etc… | 1024 |
| format | The format of the key generated. This can be either object or base64 | ”object” |
| as | The variable that you want to store the key | crypto1 |
Example
Example

Create Elliptic Curve Key
Encrypt Data
$encrypted_data.
Decrypt Data
$decrypted_data.
JWS Encode
$signed_token.
JWS Decode
$verified_payload.
JWE Encode
$encrypted_token.
JWE Decode
$decoded_payload.
| Parameter | Purpose | Example |
|---|---|---|
| curve | The curve applied to the generated key. Can be P-256, P-384, or P-521 | P-256 |
| format | The format of the key generated. This can be either object or base64 | ”object” |
| as | The variable that you want to store the key | crypto3 |
Example
Example
