RSA Encrypt
RSA Encrypt encrypts plaintext using a provided RSA public key (PEM format) and outputs the encrypted value.
The step allows configurable padding.
Parameters
PUBLIC_KEY
RSA public key in PEM format.
Example:
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqh... -----END PUBLIC KEY-----
Required
PADDING_MODE
Specifies the RSA encryption padding mode.
Supported values:
- Pkcs1
- OaepSHA1
- OaepSHA256
- OaepSHA384
- OaepSHA512
Default: Pkcs1
PLAIN_TEXT_ENCODING
Encoding used to convert plaintext into bytes before encryption.
Supported values:
- utf8
- unicode
- ascii
- base64 (if input is already base64)
Default: utf8
CIPHER_TEXT_ENCODING
Encoding used to convert encrypted bytes into output string.
Supported values:
- base64 (recommended)
- hex
Default: base64
PLAIN_TEXT_PARAM
Message parameter name that contains the plaintext input.
Default: PLAIN_TEXT
CIPHER_TEXT_PARAM
Message parameter name that receives the encrypted output.
Direction: Out
Default: CIPHER_TEXT
Execution Context Behavior
- Reads plaintext from PLAIN_TEXT_PARAM.
- Converts plaintext to bytes using PLAIN_TEXT_ENCODING.
- Imports the RSA public key from PUBLIC_KEY (PEM format).
- Encrypts using RSA.Encrypt with the configured PADDING_MODE.
- Encodes the encrypted bytes using CIPHER_TEXT_ENCODING.
- Writes the result to CIPHER_TEXT_PARAM.
Example Configuration
| Parameter | Value |
|---|---|
| PUBLIC_KEY | -----BEGIN PUBLIC KEY-----... |
| PADDING_MODE | OaepSHA256 |
| PLAIN_TEXT_ENCODING | utf8 |
| CIPHER_TEXT_ENCODING | base64 |
| PLAIN_TEXT_PARAM | PLAIN_TEXT |
| CIPHER_TEXT_PARAM | CIPHER_TEXT |
Example Result
CIPHER_TEXT = [base64 encrypted output]