开发者

What mysql data type should I use for encrypted text?

开发者 https://www.devze.com 2023-04-07 18:12 出处:网络
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 my

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

精彩评论

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