Description:
Paul DuBois wrote:
The manual says:
`ENCODE(str,pass_str)'
Encrypt `str' using `pass_str' as the password. To decrypt the
result, use `DECODE()'.
The result is a binary string of the same length as `string'. If
you want to save it in a column, use a `BLOB' column type.
How to repeat:
However, what I observe is this:
mysql> SELECT CHARSET(ENCODE('a','b'));
+--------------------------+
| CHARSET(ENCODE('a','b')) |
+--------------------------+
| latin1 |
+--------------------------+
1 row in set (0.02 sec)
mysql> SELECT COLLATION(ENCODE('a','b'));
+----------------------------+
| COLLATION(ENCODE('a','b')) |
+----------------------------+
| latin1_swedish_ci |
+----------------------------+
1 row in set (0.00 sec)
I don't see anything "binary" about the result from ENCODE().
What am I missing?
Description: Paul DuBois wrote: The manual says: `ENCODE(str,pass_str)' Encrypt `str' using `pass_str' as the password. To decrypt the result, use `DECODE()'. The result is a binary string of the same length as `string'. If you want to save it in a column, use a `BLOB' column type. How to repeat: However, what I observe is this: mysql> SELECT CHARSET(ENCODE('a','b')); +--------------------------+ | CHARSET(ENCODE('a','b')) | +--------------------------+ | latin1 | +--------------------------+ 1 row in set (0.02 sec) mysql> SELECT COLLATION(ENCODE('a','b')); +----------------------------+ | COLLATION(ENCODE('a','b')) | +----------------------------+ | latin1_swedish_ci | +----------------------------+ 1 row in set (0.00 sec) I don't see anything "binary" about the result from ENCODE(). What am I missing?