Informix Error -26005: The encrypted data is wrong or corrupted.
Cause and resolution
The encrypted data is wrong or corrupted.
The data must be a result of an IDS encryption function. The decryption may have failed because the data was not encrypted, was corrupted, or truncated (e.g. ALTER TABLE operation) since encryption, or was encrypted with an algorithm not supported by this version.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26005 fires when a decryption function's input isn't valid encrypted data — per the official guidance.
- The data wasn't actually encrypted by an IDS encryption function, per the official guidance — the first named case.
- The data was corrupted or truncated since encryption (for example by an
ALTER TABLEoperation), per the official guidance — the second named case. - The data was encrypted with an algorithm this server version doesn't support, per the official guidance — the third named case.
Solutions / Resolution
- Confirm the value passed to the decryption function is genuinely the output of an IDS encryption function, per the official guidance.
- Check for schema changes (e.g.
ALTER TABLE) that may have truncated or corrupted the encrypted column since encryption, per the official guidance. - Confirm the encrypting server's algorithm is supported by this server's version, per the official guidance.
Examples
Decrypting unencrypted data
SELECT DECRYPT_CHAR(plain_text_col) FROM accounts;
-- -26005: plain_text_col was never encrypted
Diagnostic Checks
- Confirm the column's data actually originated from an IDS encryption function, and check for any schema change that could have corrupted or truncated it since.
Related Errors / Related Topics
- -26008 — "The internal decryption function failed." A related decryption failure, from the crypto library's own API failing rather than the input data being invalid.
The value passed to a decryption function wasn't valid encrypted data — confirm its origin and check for corruption/truncation since encryption.