What mysql data type should I use for encrypted text?
Here's the type of text my encryption function throws out:
I generated several strings and they're never bigger than 50 characters, but I w开发者_如何学编程ould like to give it 75 characters in mysql. I tried using varchar, but the string gets cut off because it doesn't like some characters. Any idea what data type I should use?
If it's binary data (it looks like it is), you probably should store it in a BLOB
.
You can use a blob
, but for short data, that will make your selects slow.
Use binary(75)
or varbinary(75)
.
精彩评论