This is a discussion on Encrypted Blob Text? within the MySQL Database forums, part of the Database Forums category; Hi, I'm fairly new to databases and mysql (I'm mostly a graphics programmer). I'm writing a php ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I'm fairly new to databases and mysql (I'm mostly a graphics programmer). I'm writing a php script which accesses a database I did not create. I cannot control the structure of the table, nor can I view the source code used to add entries to the database. Here's my problem: text entered in one of the blobs that I need to access is somehow encrypted. I can't find anything about blobs being encrypted under normal circumstances. I'm hoping this is just sql naivety, and that there is some call to decrypt the blob so I can use it. I entered 0123456789 into the blob and got back: MDEyMzQ1Njc4OQ== I don't know if that will help or not. If this is not normal behavior for blobs, does anyone have a suggestion for how I can decrypt the text stored in the blob and move on with my life? Thanks, Nate |
|
|||
|
Dread Task Force Plutonium 5 wrote:
> Hi, > > I'm fairly new to databases and mysql (I'm mostly a graphics > programmer). > > I'm writing a php script which accesses a database I did not create. I > cannot control the structure of the table, nor can I view the source > code used to add entries to the database. > > Here's my problem: text entered in one of the blobs that I need to > access is somehow encrypted. I can't find anything about blobs being > encrypted under normal circumstances. I'm hoping this is just sql > naivety, and that there is some call to decrypt the blob so I can use > it. > > I entered 0123456789 into the blob and got back: > MDEyMzQ1Njc4OQ== > > I don't know if that will help or not. > > If this is not normal behavior for blobs, does anyone have a > suggestion for how I can decrypt the text stored in the blob and move > on with my life? > > Thanks, > Nate > No, this is not normal behavior for blobs. Blobs are strictly binary entities - what you put in you should get back out. You need to talk to the people inserting data into the table to see what they are doing. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
>I'm fairly new to databases and mysql (I'm mostly a graphics
>programmer). > >I'm writing a php script which accesses a database I did not create. I >cannot control the structure of the table, nor can I view the source >code used to add entries to the database. Can you access the database directly with MySQL (leaving PHP and especially PHP code you didn't write out of it entirely)? >Here's my problem: text entered in one of the blobs that I need to >access is somehow encrypted. Normally, if it goes IN plaintext, it comes OUT plaintext. If it goes IN encrypted, it comes OUT encrypted. Exceptions to this involve quoting of things like backslashes, quotes, and nul bytes in the query itself. Triggers can do things arbitrarily complicated to data in queries. There's an organization called the National Security Agency that can handle encryption difficult problems. You can't afford them. >I can't find anything about blobs being >encrypted under normal circumstances. I'm hoping this is just sql >naivety, and that there is some call to decrypt the blob so I can use >it. A trigger *could* be used to encrypt data on the way in. >I entered 0123456789 into the blob and got back: >MDEyMzQ1Njc4OQ== Using only MySQL? Or did some of the PHP code you didn't write get hold of it on the way in or out? In PHP, base64_encode("0123456789") comes out with that string above. You'd use base64_decode to decode it. >I don't know if that will help or not. > >If this is not normal behavior for blobs, does anyone have a >suggestion for how I can decrypt the text stored in the blob and move >on with my life? Take a stab with base64_decode() in PHP. |
|
|||
|
Hi, base64_decode() did the trick. Thanks a lot! I didn't know that
function existed. On Aug 6, 6:57 pm, gordonb.zf...@burditt.org (Gordon Burditt) wrote: > >I'm fairly new to databases and mysql (I'm mostly a graphics > >programmer). > > >I'm writing a php script which accesses a database I did not create. I > >cannot control the structure of the table, nor can I view the source > >code used to add entries to the database. > > Can you access the database directly with MySQL (leaving PHP and especially > PHP code you didn't write out of it entirely)? > > >Here's my problem: text entered in one of the blobs that I need to > >access is somehow encrypted. > > Normally, if it goes IN plaintext, it comes OUT plaintext. If it goes IN > encrypted, it comes OUT encrypted. Exceptions to this involve quoting > of things like backslashes, quotes, and nul bytes in the query itself. > Triggers can do things arbitrarily complicated to data in queries. > > There's an organization called the National Security Agency that can handle > encryption difficult problems. You can't afford them. > > >I can't find anything about blobs being > >encrypted under normal circumstances. I'm hoping this is just sql > >naivety, and that there is some call to decrypt the blob so I can use > >it. > > A trigger *could* be used to encrypt data on the way in. > > >I entered 0123456789 into the blob and got back: > >MDEyMzQ1Njc4OQ== > > Using only MySQL? Or did some of the PHP code you didn't write get > hold of it on the way in or out? > > In PHP, base64_encode("0123456789") comes out with that string above. > You'd use base64_decode to decode it. > > >I don't know if that will help or not. > > >If this is not normal behavior for blobs, does anyone have a > >suggestion for how I can decrypt the text stored in the blob and move > >on with my life? > > Take a stab with base64_decode() in PHP. |