Informix Error -26003: The data must be encrypted with a password length between 6 and 128.
Cause and resolution
The data must be encrypted with a password length between 6 and 128.
The encryption password is invalid because the length of the specified password was less than 6 bytes or greater than 128 bytes.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26003 fires when the encryption password's length is out of bounds — per the official guidance.
- The specified password shorter than 6 bytes, per the official guidance — the first named case.
- The specified password longer than 128 bytes, per the official guidance — the second named case.
Solutions / Resolution
- Use a password between 6 and 128 bytes long, per the official guidance.
Examples
A too-short password
SELECT ENCRYPT_AES(secret_col, 'ab') FROM accounts;
-- -26003: 'ab' is only 2 bytes
Corrected
SELECT ENCRYPT_AES(secret_col, 'a long enough password') FROM accounts;
Diagnostic Checks
- Check the byte length of the password being supplied, and confirm it's between 6 and 128 bytes.
Related Errors / Related Topics
- -26001 — "The encryption/decryption password is not set." A related password-validity error, on the password being absent rather than out of length range.
- -26002 — "Invalid encryption password data type." A related password-validity error, on the password's data type rather than its length.
The encryption password's length was outside the 6-128 byte range — use a password within that range.