FluxyAPIFluxyAPI
BlocksTokens & Crypto

Decrypt String

Unlock encrypted data using a secret key.

The Decrypt String block reverses the encryption process, turning a scrambled string back into its original, readable text. You must use the exact same Secret and Algorithm that were used to encrypt the data.

Configuration

FieldRequiredDescription
SecretThe project secret used during encryption.
Input encrypted StringThe scrambled text you want to unlock.
Decryption AlgorithmMust match the algorithm used for encryption (AES-256 or AES-128).
Decoding TypeHow to interpret the input and output: hex, base64, or automatic.
Decrypted VariableThe name of the variable that will store the original text.
Automatic Decoding

The automatic setting attempts to detect if your input is formatted in hex or base64 and returns the final result as a standard text string.

Error Handling

  • SECRET_MISSING — Triggered when no secret is provided.
  • FIELD_MISSING — Triggered if input, algorithm, or decoding fields are empty.
  • SECRET_RETRIEVE_ERROR — Triggered if the selected secret cannot be loaded.
  • DECRYPTION_INVALID_KEY_LENGTH — Triggered if the secret length doesn't match the algorithm requirement.
  • DECRYPTION_INVALID_ALGORITHM — Triggered if the specified algorithm is not supported.
  • DECRYPTION_INVALID_INPUT — Triggered if the input data is too short or malformed.
  • DECRYPTION_BAD_DECRYPT — Triggered if the secret is wrong or the data is corrupted.
  • DECRYPTION_FAILED — General failure during decryption.

Example: Retrieving a Saved API Key

  1. Secret: Select the STORAGE_ENCRYPTION_KEY used previously.
  2. Input encrypted String: Set to {db.users.encrypted_key}.
  3. Decryption Algorithm: Select AES-256.
  4. Decoding Type: Select automatic.
  5. Decrypted Variable: Enter plain_api_key.
  6. Result: The variable {plain_api_key} now contains the original readable key, which you can use in an External API Request block.

On this page