Informix Error -26002: Invalid encryption password data type.
Cause and resolution
Invalid encryption password data type.
The encryption password is invalid because the specified password data type is not supported. Use a string type (such as CHAR(20) or VARCHAR(40)) for the encryption password.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26002 fires when the encryption password's data type isn't supported — per the official guidance.
- The specified password's data type not being a supported string type, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use a string type such as
CHAR(20)orVARCHAR(40)for the encryption password, per the official guidance.
Examples
An unsupported password type
SELECT ENCRYPT_AES(secret_col, 12345) FROM accounts;
-- -26002: 12345 is INTEGER, not a string type
Corrected
SELECT ENCRYPT_AES(secret_col, 'my password') FROM accounts;
Diagnostic Checks
- Check the data type of the value passed as the encryption password, and confirm it's
a string type such as
CHAR/VARCHAR.
Related Errors / Related Topics
- -26001 — "The encryption/decryption password is not set." A related password-validity error, on the password being absent rather than the wrong data type.
- -26003 — "The data must be encrypted with a password length between 6 and 128." A related password-validity error, on the password's length rather than its data type.
The encryption password's data type isn't a supported string type — use CHAR/VARCHAR.