You are here: Handling Binary Strings « PHP Programming Language « IT news, forums, messages
Handling Binary Strings

Posted by CharlesL on 11/05/06 18:45

I am trying to handle binary strings in php. I get a binary output
initialization vector from mcrypt as such:

from mcrypt:
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

This output may have padded nulls at the end which are significant.

I would like to convert all characters including all padding nulls at
end and convert it in a string to be saved into a database in such a way
that I can reconstruct it back to binary again later.

base64_encode and decode is not doing the job. They don't seem to
preserve the original binary value after base64_decode().

Can someone suggest some other way to preserve binary data into ASCII
and back in php?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация