开发者

What mysql data type should I use for encrypted text?

Here's the type of text my encryption function throws out:

What mysql data type should I use for encrypted text?

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜