I'm developing a web app and I have to encrypt data with RSA. I'm using FuelPHP and MySQL. My problem is that when I want to insert encrypted value, it doesn't works, the value is null.

For example, when I want to insert

"Š@žÊ~±ðÞ” ¯šÝ²à6°ÔökáÒïX´nÜ t|÷"ŒIñˆÃæ\{·"/8QzÑ6©Õîýízâ®ï Û»·Åe“ópÓ*ˆeÍ,¸XK’‡HR")DO@þÞœ¬±1õ0ð>‚ûÜÑ ;´šSxБÓýäƒ6ÈJ"

which is Guillaume encrypted with an RSA private key. The inserted value is null.

The type of my attribute is varchar(128), I also tried varchar(256) but it doesn't works.

有帮助吗?

解决方案

You need to use Binary data type such as BLOB for storing this kind of data.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top